Thursday, September 9, 2010

Exporting all events from iPhoto to a disk folder

Recently my wife asked to download all photos from my iMac to her Windows7 notebook PC structured into the directories named after the corresponding event name. As there was no such feature present in the iPhoto I decided to write a script to automate the task. Unfortunately the Apple scripting for the iPhoto application is not able to exploit even a half of all features available. There is no way to get the list of all events and therefore no way to find out the photos they contain. The standard export function can not be accessible with the scripting too.

After some Google searching I found a very interesting resource by Michael Kwaƛnicki. The idea of accessing the files in the iPhoto library package directly using the information in the SQLite database is brilliant. The script bellow creates the "iPhoto export" folder under the users's "Downloads"and saves all events each to the separate folder  having the media files ordered by name.

Download: export all iphoto events.applescript (4 KB) [2010-09-07]

2 comments:

  1. Couldn't get this to work in iPhoto '11 :(

    Got this error message when running the script "error "SQL error: no such table: SqEvent" number 1"

    ReplyDelete
  2. I have not tried this with iPhoto'11. Will check and post the fix

    ReplyDelete