Download Photo Stream Photos to a Folder in Mac OS X

Feb 11, 2012 - 13 Comments

Save Photo Stream Images 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 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.

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:
  • 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

  • This will look something like this in the AppleScript editor:

Download Photo Stream Images to a Folder in Mac OS X with an AppleScript

  • 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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in iPad, iPhone, Mac OS X, Tips & Tricks

13 Comments

» Comments RSS Feed

  1. Clark says:

    Excellent tip. I think Apple doesn’t allow us a choice because soon we will have no file system to choose from :(

  2. skk says:

    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..

  3. Rafagon says:

    You need iLife *’11* as well… This wasn’t mentioned in the article!

  4. tom says:

    don’t work for me… sorry… tried all.

    but I WANT IT!

  5. Chris says:

    Why not use “folder action” ? Or the folder “assets” is a special one, so “folder action” doesn’t work on that ?

  6. Photodweeb says:

    I tried to compile and got “Expected end of line, etc. but found identifier.” “IMG” is highlighted as the location of the issue. hmmm

    • Matt says:

      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.

  7. Chris says:

    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!

  8. thebingster says:

    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.

  9. thebingster says:

    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.

  10. Osgood says:

    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

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates