Auto-Upload to FTP folder with Cyberduck

[Don’t know, if Windows users will have any use of this. Sorry.)

I use this on a Mac OSX.4.11 installation, and it should work all the way up to OSX.8.

The Cyberduck FTP upload AppleScript, which chrispie.com had modified, I have further modified and now very flattering call AutoUpload2FTPwCyberduck. This means it does not sync – it simply auto-uploads things, which are added to a designated folder.

Once you have placed the script in (HD)/Library/Scripts/Folder Action Scripts, and attached the script to a folder of your choice via Folder Actions (Ctrl+Folder Actions), AU2FTPwC goes to work.

WHAT IT DOES

—

Open a new document in Script Editor and insert the following. Edit the info in bold, and then save it in (HD)/Library/Scripts/Folder Action Scripts:

— > From here

— Copyright (c) 2004 David Kocher. All rights reserved. — http://cyberduck.ch/ — — This program is free software; you can redistribute it and/or modify — it under the terms of the GNU General Public License as published by — the Free Software Foundation; either version 2 of the License, or — (at your option) any later version. — — This program is distributed in the hope that it will be useful, — but WITHOUT ANY WARRANTY; without even the implied warranty of — MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the — GNU General Public License for more details. — — Bug fixes, suggestions and comments should be sent to: — dkocher@cyberduck.ch on adding folder items to this_folder after receiving added_items     delay 300     set theServer to “your.FTP.server”     set theUser to “yourlogon”     set thePassword to “yourpassword”     set theProtocol to “ftp”     set theUploadFolder to “youruploadfolder”

— NB: Create the upload folder on your server, before using the script.         set the item_count to the number of items in the added_items     if the item_count is greater than 0 then         with timeout of 300 seconds             tell application “Cyberduck”                 set theBrowser to (make new browser)                 set miniaturized of window 1 to true                 tell (theBrowser)                     set encoding to “UTF-8”                     connect to theServer with protocol theProtocol as user theUser with initial folder theUploadFolder                     repeat with theFile in added_items                         upload item theFile                     end repeat                     disconnect                 end tell                 tell (theBrowser) to close             end tell         end timeout     end if end adding folder items to

Author: krabat

digter, forlægger, oversætter, admin på kunstnerhotellet menneske.dk

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.