Your best friend for file transfer.Fetch
automating 'puts' (3 posts)
- Started 8 years ago by tomp
- Latest reply 8 years ago from haecceity
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?
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.
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"
delete remote directory "Backups"
put into remote directory remotedir item alias "Macintosh HD:Users:user:Backups:"
close transfer window 1
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.
- Page 1
This topic has been closed.