How to import images from Photo Stream to Dropbox folder with AppleScript

Update: Turns out, this too can be done with Hazel. My script isn’t necessary.

Earlier today, I wrote about how I’m using Dropbox as my photo management app. I closed with this:

This setup doesn’t harness PhotoStream, however, so I still have iPhoto setup to catch those images, just in case I don’t import something by mistake.

Turns out, importing images from Photo Stream into the folder Hazel watches to rename them can be automated, too. Here’s how I did it:

OS X Mountain Lion stores a copy of your Photo Steam in this folder:

/Library/Application Support/iLifeAssetManagement/assets/sub/

In that sub folder, an sub-folder is created for each image in your Photo Stream. Dumb, but that’s how it works. With a little AppleScript, we can grab the photos and move them to another folder.

Here’s the script:

(You can download the script as a .txt file here.)

You will obviously need to rename those folder paths to for your own use. You can change the “move” command to “copy” if you wish to leave the originals in place, but each time you run the script, you’ll get all the photos in sub again.

Moving the images out of the local copy of your Photo Stream doesn’t remove them from your iOS devices, so you can still see your last 1,000 images on your iPhone or iPad. In other words, this script just affects the local copy of the image, not the copy on iCloud itself.

This does seem to require having Photo Stream setup in iPhoto, but not necessarily setup to import:

Now, any time I want to process photos, I can either import photos via USB or trigger this script and go to work.

(As with other scripts, etc. I post, I don’t offer support on this. If you’re the type to want to do this, I assume you’re bright enough to know this could blow up.)