FTP Script Help

Discussion in 'Web Design and Development' started by TDPHunter, Nov 4, 2009.

  1. TDPHunter macrumors member

    TDPHunter

    Joined:
    Jan 7, 2007
    Location:
    Orlando, FL
    #1
    Hello,

    I am having to connect to an ftp server on a daily basis and download several files. I was wondering if anyone knew of a script that would connect to an FTP server, download all files that have been modified recently, and redirect them into the correct folders on my local hard drive.

    The place that I work moves all updated files to the FTP server and I always need the updated versions of these files. However, Instead of downloading the whole folder, I would like it if I had an automatic way of only getting what has been updated since the last download. Much like a differential backup of everything on the server to my laptop.

    If anyone has any input or can throw a script together, that would be amazing! Thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    You may wan to look into using rsync (remote synchronization), which is intended for this type of work flow. It's a command line tool that is already installed onto your Mac. There's also a GUI front end that someone created called Grsync that works pretty good.

    Another thing you should have your business look into is Subversion. It's a code repository and versioning system. It keeps the current code in a central repository and developers check out the code as need be (or update only the code that's outdated) and then when they're done they commit their changes back to the repository and supply comments on what changed.

    A simpler approach would be to use Cyberduck and use their Synchronize option. I haven't used it much so not sure if it updates both the client and server files to the newest versions. I'd test it out before committing to it too much.
     
  3. TDPHunter thread starter macrumors member

    TDPHunter

    Joined:
    Jan 7, 2007
    Location:
    Orlando, FL
    #3
    Hey, I appreciate your response and Ill look into each option. Thanks
     
  4. TDPHunter thread starter macrumors member

    TDPHunter

    Joined:
    Jan 7, 2007
    Location:
    Orlando, FL
    #4
    Cyberduck seemed like the best approach but it continues to drop the connection within 4 minutes of the sync. Anyone familiar with setting up rsynce with an ftp server. Is it even possible?
     

Share This Page