I’m completely new to applescript, and have a question about the difficulty level for a script that satisfies my need. I’d like to automate the uploading of new files that occur in a directory to a certain ftp site.
For example, any new or changed file in my ~/Sites/test directory should automatically upload to ftp://mysite.com.
I’m aware that os x finder is read-only for ftp, so I’m hoping that this can be accomplished by somehow combining the use of folder actions and cmd line ftp.
tell application "URL Access Scripting"
upload file "path:to:file.txt" to "ftp://username:password@ftp.server.net/directory/"
end tell
You’ll need to add the logic to work out which files are ‘new’, but this is easily done, and is automatic if you set this script up as a Folder Action.