Programming to upload files to the server

Discussion in 'Programming' started by urstop, Nov 22, 2007.

  1. #1
    Hi,

    I have to daily move 100s of files from my local desktop to my webserver. I normally do it manually by opening up the FTP in the browser.

    Is there a way I can automate this stuff, all the files to be uploaded are there in a single folder with .xml extension. Upload can be either thru HTTP or FTP anthing is fine as long as it saves me from the effort of doing the task manually.

    Regards,
    UrStop
     
    urstop, Nov 22, 2007 IP
  2. DonCash

    DonCash Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey.

    I can write you a small Java program to automate this process.

    It shouldn't take much work so it wont cost too much.

    PM me if your interested.

    Thanks
     
    DonCash, Nov 27, 2007 IP
  3. dannet

    dannet Well-Known Member

    Messages:
    864
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    153
    #3
    There are a few alternatives, you can use the curl library and create a little php script, executing it with a cron.

    Here there is an example of a curl FTP upload script, in this case the files are selected with a form, but you can change it easily and set the path to your local files:
    http://www.web-development-blog.com/archives/tutorial-ftp-upload-via-curl/

    Good luck
     
    dannet, Nov 28, 2007 IP
  4. HomeContrast

    HomeContrast Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Depends if you're running Windows or Linux. Both are relatively easy with the software included with the OS.

    Simpliest way in windows is probably with a scheduled task running a vbscript or jscript (using the cscript.exe executable).

    FTP in Linux is easy too and can be scheduled with cron.

    Let us know the OS and we can give more specific advice.

    Richard
     
    HomeContrast, Nov 28, 2007 IP
  5. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks HomeContrast , mine is a windows OS, so I took your advice and did some search on google and found a vbscript to do the task.
     
    urstop, Dec 2, 2007 IP