Download Photo Stream Photos to a Folder in Mac OS X
Photo Stream is a nice feature of iCloud that pushes all of your pictures automatically to your other iOS devices and your Mac with iPhoto or Aperture. If you haven’t used it before, this means if you take a picture on your iPhone, it will automatically show up in the Photo Stream on your iPad, and also in iPhoto on your Mac. Oddly, there isn’t an option to choose a destination other than iPhoto or Aperture in Mac OS X though, but this cool trick allows you to specify a folder and then download all the images from iCloud to your Mac, without using iPhoto or Aperture.
In order to use the following script, you will need at least iOS 5 and OS X 10.7.2 or later, as well as iCloud set up and configured and the Photo Stream option enabled in Mac OS X’s iCloud System Preferences.
How to Save Photo Stream Images to a Folder in Mac OS X
- Open AppleScript Editor, found at /Applications/Utilities/AppleScript Editor.app
- In a new blank AppleScript window, paste in the following code, replacing “USERNAME” with the short user name of your Mac OS X home directory:
- This will look something like this in the AppleScript editor:
tell application "Finder"
set this_folder to "Macintosh HD:Users:USERNAME:Library:Application Support:iLifeAssetManagement:assets" as alias
set target_folder to "Macintosh HD:Users:USERNAME:Pictures:MyStream" as alias
try
duplicate (every file of the entire contents of this_folder whose name contains "IMG") to the target_folder with replacing
end try
end tell
- Adjust the target_folder variables as appropriate – Change “Macintosh HD” if your hard drive is named something else, and change “MyStream” if you want the final directory to be something other than that name located in the user Pictures directory – remember with AppleScript, rather than slashes the colon is used instead to type and show file and folder paths
- Run the script to verify that it works and then save the script with an appropriate name like “PhotoStreamDownloader”, and select “Application” as the file format for easy access and launching later
Now anytime you want to download your Photo Stream to your Mac, just launch that saved script app and you will grab your latest Photo Stream images to the configure directory in Mac OS X. For best results, place the application into your /Applications directory and add it to Launchpad for easy future use.
AppleScript Editor is fairly intuitive, and if you entered a directory or path wrong when you attempt to run the script it will let you know with an “AppleScript Error” message. If you get a “iLifeAssetManagement:assets wasn’t found” message, then you haven’t enabled Photo Stream in iCloud’s System Preference panel.
Hopefully a future update to iCloud and Photo Stream will allow us to choose an image download destination directly, but until then this great trick works just fine.
Like this? Check out some more iCloud tips.
Quick suggestion: use the “path to” command to derive the paths to common folders:
set the PhotoStreamFolder to (((path to application support folder from user domain) as string) & “iLifeAssetManagement:assets:”) as alias
set the destinationFolder to (((path to pictures folder) as string) & “MyStream:”) as alias
tell application “Finder”
try
duplicate (every file of the entire contents of this_folder whose name contains “IMG”) to the target_folder with replacing
end try
end tell
Frustrating that you need iPhoto 11 just to enable Photo Stream. Is there any way of doing this without it?
I have no interest in using iPhoto as I use Lightroom, so I’m loathe to upgrade (I have iPhoto 09) just to use this feature.
Frustrating that you need iPhoto 11 just to enable Photo Stream. Is there any way of doing this without it?
I have no interest in using iPhoto as I use Lightroom, so I’m loathe to upgrade (I have iPhoto 09) just to use this feature.
Is there anyway to just do a delta update of the folder in this script? Replace all everytime takes forever. Is there anyway to make it just grab the new files? I don’t know enough of the scripting to make that happen. Please help!
I tried to compile and got “Expected end of line, etc. but found identifier.” “IMG” is highlighted as the location of the issue. hmmm
It’s probably the quotations, retype them from your keyboard rather than copy and paste and it should work. Web browsers can mess up quotes sometimes.
Why not use “folder action” ? Or the folder “assets” is a special one, so “folder action” doesn’t work on that ?
don’t work for me… sorry… tried all.
but I WANT IT!
You need iLife *’11* as well… This wasn’t mentioned in the article!
Works for me and I don’t have iLife.
Do you have iPhoto? I removed iPhoto from my Air (partially to save space, mostly because its an awful program), and it doesn’t work for me.
In order to use the following script, you will need iOS 5 and OS X 10.7.2 or later, as well as iCloud set up and configured and the Photo Stream option enabled in Mac OS X’s iCloud System Preferences.
AND
iphoto installed otherwise its not working at all..
Excellent tip. I think Apple doesn’t allow us a choice because soon we will have no file system to choose from :(