Export Your iPhoto Library to a Folder Structure

I wanted to export my iPhoto library to a folder structure and was disappointed to see that iPhoto has no built-in way to do it.

I found a nice little script written by Derrick Childers (scroll down to his comment; don’t use the original shell script) that did almost exactly what I needed. Derrick’s original version exported all events by year, except it didn’t work in all cases because it was based on the year of the photo’s filestamp, which might be different than the year it was taken (e.g. if you went back to retouch a photo). Guillaume Boudreau added support for exporting albums and removed the year folder because it didn’t work well, but I put it back and fixed the it to generate the year based on the event date.

(Update: I changed it to generate more than just the year. I generate the entire date of the event, followed by the event name.)

I tested it with:

  • Leopard 10.5.8
  • Python 2.5.1
  • iPhoto 8.1.2

Derrick tested his original with:

  • Snow Leopard 10.6.2
  • Python 2.6.1
  • iPhoto 8.1.1

I’ve posted it to Github. Feel free to fork and modify to your taste.