Trying to automate my FTP upload process using Cyberduck.
Essentially, I would like to create a “watch folder” that automatically uploads a file (or files) placed in it (via Cyberduck) to a specific FTP site without interaction (allowing overwrites etc.)
Once the upload is complete the file would automatically be deleted from the home folder.
Sorry if this a trivial request - my company was recently hit with ryuk and while our macs survived all the window servers and functions were wiped out.
Thank you advance for your time and consideration.
You can achieve this by creating HOT folder on your Mac. For full automation you need create script and attack this script to HOT folder. Without manual interaction at all with FTP site you will need retrieve some data from site page with do javascript command of AppleScript. This will need to check, is the file fully uploaded and verified on site or not (to delete on Mac). Some interaction (such as when rewriting) you can’t avoid at all. But you can do script click needed buttons of pop up windows of page (or of Cyberduck) such as “OK”, “Cancel”, “Allow”, by UI scripting means and System Events clicks.
And if Cyberduck has poor user interface and is fully unscriptable app, then no need Cyberduck
at all for your purposes
About such a script you need attack to HOT folder:
on adding folder items to this_folder after receiving added_items
set theFile to item 1 of added_items
upload(theFile, "ftp://user:password@domain.com/public_html/temp/")
if result = true then move theFile to trash
end adding folder items to
on upload(theFileOrFolder, remoteDir)
--- your upload handler statements
end upload
One such ready upload handler is HERE. You can slightly change it for your purposes