Folder Action: SCP folder contents

SCP Folder Contents IconMy buddy Scott is beginning a comparison of Lightroom vs. Aperture (maybe he’ll blog about the results). It turns out that it’s really easy to get Lightroom to upload a web gallery to an FTP server. On the other hand Aperture only has one-click uploading to .Mac; there are plug-ins that allow exporting images directly to a variety of online servers (including FTP), but none of them seem to work with entire web galleries.

Since Aperture can export the web galleries directly to disk, I decided to use a Folder Action to send those files directly to my server via scp (which is more secure than standard FTP).

Click here to download this Folder Action.

You can install this script by copying it into ~/Library/Scripts/Folder Action Scripts (you might have to create this folder).

To use this applescript:

  1. Create a new folder to use as a dropbox (it can have whatever name you find most descriptive).
  2. Option-Click the new folder and select Get Info from the menu.
  3. Under Spotlight Comments put the destination for the scp transfer in the form: username@hostname:destintation_path.
  4. Option-Click the new folder and select Attach Folder Action...
  5. Find and select “SCP folder contents” in the file chooser.

Note: You must have SSH public key support to be able to run this script to connect securely to the remote system.

Now any files dropped on the new folder you created will be automagically transferred to the remote server (and the local copy is moved to the Trash).

I keep a folder for each remote system I use regularly. Now I can just export directly to these folders from Aperture, and the exported files are transferred to my server without any further intervention on my part.

If you have any questions or feature requests just let me know in the comments section.

6 replies on “Folder Action: SCP folder contents”

  1. I just wanted to point out a couple of things. First while I use this script for scp’ing files from Aperture, it’ll work for anything you need to scp to a particular server/directory often. iWeb, RapidWeaver, or even as a simple backup mechanism.

    Also, you don’t need to necessarily drag the files onto the icon. Saving straight to the folder from any program should be good enough!

  2. I just wanted to point out a couple of things. First while I use this script for scp’ing files from Aperture, it’ll work for anything you need to scp to a particular server/directory often. iWeb, RapidWeaver, or even as a simple backup mechanism.

    Also, you don’t need to necessarily drag the files onto the icon. Saving straight to the folder from any program should be good enough!

Comments are closed.