Your best friend for file transfer.

Fetch application logoFetch

automating 'puts' (3 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 10 years ago by tomp
  • Latest reply 10 years ago from haecceity
  • tomp Member

    I would like to initiate an Apple Process that would open an ftp site and 'put' a folder from a directory on my hard disk onto the site with no user intervention.

    I recorded an Apple Script to do this using Fetch for the 'Put', but when I run the script, fetch asks for all the site info and I have to manually 'put' the file.

    Can this be completely automated - login and put?

    TIA

    Posted 10 years ago #

  • Jim Matthews Administrator

    Yes, it can. Be sure to turn off the "Show New Connection dialog at startup" preference in the Misc. section of Preferences. if that doesn't work I'd be happy to look at your script.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

  • haecceity Member

    This script should work for you. Replace 'UserName', 'PassWord', and 'Remotedirectory' with your own information (and change the folder you're going to back up). Let me know if it works.

    tell application "Fetch 4.0.3"
    set remotedir to remote directory "ftp://UserName:PassWord@Remotedirectory"
    open remotedir
    delete remote directory "Backups"
    put into remote directory remotedir item alias "Macintosh HD:Users:user:Backups:"
    close transfer window 1
    quit
    end tell

    The reason for the 'delete' command is that since I repeatedly backup the same folder, I need to remove the old copy from the server. Omit this command if it doesn't suit you.

    ian

    Posted 10 years ago #

Topic closed

This topic has been closed.