Sep 13 2011
iPhoto: Export ALL Events to Folders
OS X App – iPhoto: Export ALL Events to Folders:
Export All photos from iPhoto Events into individual folders, named by the event (and date, if you prefer).

Export All Events – iPhoto Event Exporter
I ran into a situation that I am sure many have faced: My iPhoto library is huge, and I wanted to export all of the images and photos into clean folders based on Event Titles.
Through iPhoto, it’s easy enough to File -> Export one Event at a time, if you only need that – but iPhoto has no way of exporting ALL at once, in a folder structure.
Editor’s Note: iPhoto 11 does now have the ability to export with Event Titles, however it’s not an automatic solution. This Application will work on the entire library.
Thankfully, someone out there also had this idea, and wrote a python script to accomplish this. I took that script and wrapped it into an application that will cleanly complete this task for you. If you’d like, the original script is here.
All you have to do is tell it where your library is, where you want the exported files to go, and the system will do the rest.
Run it, sit back, and let it complete. After it starts, it will not give you status until it has finished.
Update: There are now two versions of this software.
The “No Date” Version will format the output folders as “Event Name” only.
The “Date Prefix” version will format the output folders as “YYYY-MM-DD Event Name”.
Tested on:
| iPhoto 8 | iLife ’09 | January 7, 2009 | 10.5.6 | Universal |
| iPhoto 9 | iLife ’11 | October 20, 2010 | 10.6.3 | Intel |




Mar 13, 2012 @ 22:51:39
Awesome! This works like a charm. Thanks a million…you save me hours of frustration.
Best regards
_SR
Apr 13, 2012 @ 07:32:51
Does it save a copy in iPhoto or just export a copy.
Apr 13, 2012 @ 07:55:11
does it leave a copy in iPhoto?
Apr 13, 2012 @ 12:46:18
This takes every photo that is in an ‘event’, copies it to a physical directory. It will not MOVE OR DELETE anything from iPhoto. It simply reads the event structure and the file paths from iPhoto to make a copy elsewhere.
Apr 13, 2012 @ 12:46:42
Glad it helps!
Apr 15, 2012 @ 08:56:59
Fantastic Thanks
Apr 22, 2012 @ 09:52:42
I just used this tool to extract all my events from iPhoto and I have to say it did NOT export them all. Out of about 200 events it only exported 114. I’m having to go thru them now comparing lists and manually exporting the missed events. Disappointed that it didn’t do it very well for me.
Apr 22, 2012 @ 11:29:23
Ray,
I’m sorry this tool didn’t work to your satisfaction.
Perhaps there’s something unique about your version of iPhoto or your events. Could you provide a more detailed explanation of what went wrong – perhaps the version of iPhoto, and any special characters maybe in the events that didn’t export?
It is possible that certain events won’t export, if they’re duplicated, or if they contain a file format or character that my script can’t compensate for.
I’d really be interested in this information, so that I can correct the problem for future users.
Apr 25, 2012 @ 15:19:20
Good job man! all was going fine during the copy process until this wild error happen http://screencast.com/t/7pv9N94dJQ
hope you can fix this! if you need more data just ask for it please.
Apr 25, 2012 @ 15:25:54
This error is because the application cannot translate your language. Non-english characters will fail. Remove any special symbols from the events like ‘ or ` or ~
Apr 26, 2012 @ 15:44:15
Thanks for your help but i give up. It was able to export half of my library to my NAS but it´s showing continuously this error:
http://screencast.com/t/bW2TbHnld
i´ve removed those symbols from events and faces with no luck :_(
Any hint or trace log where i could search?
Thanks.
Apr 30, 2012 @ 11:31:54
Again, this error that you’ve reported speaks to the file name of the photo or Event.
Somewhere in your photo library, you have a special character, a TICK MARK or UMLAUT on a filename.
I can’t help you any further because I can’t see what your files look like. If it were me, I would look for the file using a fast search, like terminal:
Open Terminal
type the command:
find /path/to/your/iphoto/blibrary -name “*’”
and
find /path/to/your/iphoto/blibrary -name “*`”
and
find /path/to/your/iphoto/blibrary -name “*¨”
Repeat this with each special character you may have named your files.. this will give you a place to start.
Apr 30, 2012 @ 14:56:07
Thanks that helped a lot!, there was a f*****ng hidden Ñ character in a long event name. Removed and going on….
Now other error appears: http://screencast.com/t/C6R8IsBGoq
I have tried to find it but no luck again.
I don´t want to bother you with this, so if you can´t figure out what it is, forget it please.
L8rs
Over
May 01, 2012 @ 13:24:23
That error is valid. It means that there is a reference to an image in iPhoto that doesn’t physically exist in the direcotory. You may want to rebuild your iPhoto library and try again.
To rebuild the iPhoto library:
Quit iPhoto if it is open.

Hold down the Command and Option keys on the keyboard.
Open iPhoto.
Keep the keys held down until you are prompted to rebuild the library.
A dialog will appear with rebuild options. Select the options you want to use.
Click Rebuild to begin the rebuild process. This may take a few minutes to complete.
May 02, 2012 @ 15:49:53
Hi Billie, my congrats for your precious time, that fixed my problem!
http://screencast.com/t/1MSuP2TcmgMy
Best regards,
Over.
Jul 09, 2012 @ 19:27:48
I recently undertook a project to consolidate all of my digital photos from 4 computers taken over the past @10 years. Turned into a huge unorganized mess. I decided I wanted to organize all of my pictures in folders, and then use iPhoto once they were organized. This script worked great when trying to get my photos from my mac consolidated into folders with my 3 PC files.
I’m so tired I’m not even sure what I just wrote makes sense, but in any case, this script worked great for what I needed it for.
Thank you!!!!
Aug 28, 2012 @ 14:39:54
Thanks for doing this; your script is pretty good. I can’t believe it exists, and I can’t wait to fully separate myself from iPhoto. It got through about half of my photos, in alphabetical order, then prompted me with this message: http://i.imgur.com/xcRPl.png
I tried searching for characters in terminal but nothing showed up. I have about 120 more events to go through and I was considering doing them manually but I thought I would check here first to see if there is something else I could do. Any ideas?
Aug 28, 2012 @ 14:55:54
UPDATE: I just found an alternate solution to the problem. In iPhoto, you can select multiple events and go to File->Export. Under “File Export” choose “Current” for Kind and “Event Name” for Subfolder Format. iPhoto, believe it or not, does the rest.
Aug 28, 2012 @ 15:21:19
ANOTHER UPDATE: For some reason the iPhoto method broke all my video files. That wasn’t a problem with your script.
Sep 29, 2012 @ 21:28:14
Hi Billie, I had 370 events (almost 30 GB) and your wonderful software exported every single event. Thanks very much. I have two questions:
1. How is it that after exporting I note that the exported 370 events are less than 8 GB. Does it not export at original resolution?
2. This is probably a silly question, but when I get a new iMac and I import your exported events, how do I get back the same 370 event titles? Do I import one by one?
Cheers
Sep 29, 2012 @ 22:02:21
Good questions!
1. The script should export the photo versions at the resolutions and file sizes in each Event/roll. Any other changed versions, thumbnails, XML data, etc. of the photo stored in the iPhoto Library will be ignored.
2. You can select all the folders, drag them into the iPhoto main screen (Or over the event icon in the left pane), and it will copy them over as individual events
Sep 29, 2012 @ 22:21:35
Hi,
I’m on iPhoto ’08 version 7.1.5 whilst my iMac is 10.6.8 -- will this help in digging deeper into your answer to my Question 1? I’d really like back the full resolution. Thanks
Sep 29, 2012 @ 22:38:23
I’m sorry, my script can only pull information from iPhoto Library as it’s available. It pulls the master XML to determine the photos, locations for the ORIGINAL Folder located in the iPhoto Library File.. It should export the original resolution. It has been tested against iPhoto 08, and worked as expected.
Sep 29, 2012 @ 22:48:48
Hi again, here’s a thought. When I say 30 GB that’s what Finder says is Iphoto Library but that may not be accurate. I’m not a techie but when I load every single photo into my new iPad it says 9.2GB so maybe it is at full resolution but Finder includes other info etc?
Sep 29, 2012 @ 23:10:13
Yes, that’s the jist of it. Any other changed versions, thumbnails, XML data, etc. of the photo stored in the iPhoto Library will be ignored. (but they account for the size of the library. )
Oct 18, 2012 @ 17:29:23
Haven’t seen this one before:
Traceback (most recent call last):
File “/Users/Noah/Library/exportiphoto.py”, line 604, in library.walk([copyimage])
File “/Users/Noah/Library/exportiphoto.py”, line 303, in walk func(imageld, targetFileDir, folderDate)
File “/Users/Noah/Library/exportiphoto.py”, line 598, in copyImage library.copyImage(imageId, folderName, folderDate)
File “/Users/Noah/Library/exportiphoto.py”, line 346, in copyImage basename = /Users/Noah/Desktop/Screen shot 2012-10-18 at 7.29.03 PM.pngos.path.basename(mFilePath)
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ posixpath.py”, line 111, in basename AttributeError: ‘NoneType’ objet has no attribute ‘frind’
Oct 18, 2012 @ 18:00:34
Could it be the “Hidden” attribute? Once I cleared that flag, it flew thru the lot!!~
Oct 21, 2012 @ 16:08:17
This script does not work correctly. I am using iPhoto ’11 (v9.4.1) on Mountain Lion with a brand new iPhoto library I created for test purposes with 1477 photos/videos. I basically had 1477 items in a single directory consisting of .JPG, .jpg, .PNG, .MOV, .MP4 files. I opened up a brand new iPhoto library from scratch and dragged this directory onto iPhoto so that the files would import. After exporting, there are the following problems:
1. A small number of pictures have had their creation dates changed, but not all.
(http://pictat.com/i/2012/10/21/27687screenshot.jpg)
2. In 710 out of 1477 photos, the exported pictures were larger in size and many had their dates changed.
(http://pictat.com/i/2012/10/21/15001screenshot.jpg)
Oct 22, 2012 @ 12:55:41
To address this:
1. The script will favor EXIF data over Finder File data -- meaning, if the photo has a record of ‘date taken’ it will favor that over the ‘created’ date, as that date could have been when it was ‘created’ in the iPhoto Library, or when it was ‘copied’ into a folder from another drive.
2. The file size would increase because during the export process, there is a number of EXIF tags that are associated to the file from iPhoto. If these can be attached to the photo, they will. Also, since this is an extraction from a folder and a re-save, properties and attributes of the file will be associated.
Finally, this was tested with 6 sample Libraries, and these type of results were observed, but file quality and structure of the files were not affected. The primary goal of the software is to automate the extraction of the photos from the library.
As far as I know, the new versions of iPhoto have this function built into it via export.
iPhoto 8 iLife ’09 January 7, 2009 10.5.6 Universal
iPhoto 9 iLife ’11 October 20, 2010 10.6.3 Intel
Oct 22, 2012 @ 12:57:29
This is a known issue with newer versions of iPhoto. It seems that there is a flag (attribute) that is set on the photos that can’t be translated properly. I haven’t had time to pin it down, but the work around is to clear the flag on photos before export.
Nov 13, 2012 @ 21:53:04
Hi Billie,
thanks for the script. I am running it now. Just had to start over, though, to remove special characters.
I have a question that I didn’t see answered here: I would like to copy the most recent version of the photos, that is: the version after editing (red eyes, levels, contrast,…). I have over 10 000 pictures so I don’t want to start editing them all with a different tool all over
Does the script copies the version as it came from the camera, or the final version after all the editing?
Nov 14, 2012 @ 11:18:58
The script pulls the path from the XML data that points to the original file. in essence, it only pulls from the originals folder in the iPhoto Library.
Nov 21, 2012 @ 16:10:43
Really this is what I have been looking for about a year… Many thanks, will reblog it and mirror your script
Dec 04, 2012 @ 10:13:32
I was experiencing the same problem, and after many attempts of using this script without having success, I realized that it was as simple as right clicking on the library, select display/show package content (I’m translating from spanish so maybe there are some differences in the words) and copy all the events’ folders from “Marters”. Is there any other reason for using the scrip instead of doing what I just did??
hope this helps,
Frank
Dec 04, 2012 @ 10:25:56
Yes, the reason this script is useful is that iPhoto doesn’t organize photos in Events sections or folders. It sorts by date. All ordering and events, rolls, and folders were not stored in a hierarchy as you have them in the applciation.
For those who don’t understand what frank means in his comment:
If you go into the Finder, navigate to the iPhoto Library, it’s actually a folder of files. Ctrl-Click it, and Show Package source. Once you are in there, you can see the MASTERS folder -- this is the core listing of photos. As you can see in there, it doesn’t actually move the photos into events or folders as you set them up in iPhoto. The XML file in iPhoto is what tells iPhoto how to organize the library.
This is done to preserve the originals, and avoid dupications if you store a photo in more that one event, create smart lists, or Albums.
Also, As I have pointed out on many occasions, this script will not work in anything but ENGLISH. It can only handle 123456789, abcdefghijklmnopqrstuvwxyz, !#$%^&*()_+-=/?. Foreign characters will break the script. á, é, í, ó, ú, ü, ñ, ¿, ¡ do not work, for example.
Dec 05, 2012 @ 15:50:19
Billie, as I had so many folders and files, I hadn’t noticed the difference between your script and copying the files just like that. Thank you for your answer that made me realize that there is a huge difference between those 2 options. I would also like to thank you for the script and the tip about the spanish characters: that was why it was not working for me.
Thanks a lot,
frank
Jan 19, 2013 @ 07:13:20
Hi Billie,
Thank you for sharing this script, this is very useful!
I have a question though, I have a big part of my photos in RAW format. When using the tool I get the pictures in .jpg format. Is there anyway we could choose to export RAW pictures?
(am using Iphoto 09 V8.1.2)
Thanks for your time,
Syl
Jan 19, 2013 @ 16:05:03
I haven’t quite worked that part of it out, as RAW isn’t native to the OS. This script relies on the built in Imaging engine from Mac Os X, and sadly, I haven’t studied up on RAW formatting.
Jan 20, 2013 @ 06:53:47
Hi Billie,
Thanks for your reply.
I believe it would be a good feature to add to your very good apps. In the meantime I will try to find an alternative solution.
I was wondering if this script could be modified to work with aperture too? or with Itunes? That could be also interesting.
Jan 20, 2013 @ 09:20:02
I’ve actually pretty much abandoned iPhoto in favor of Aperture, which I think can export in the manner that this app does for iPhoto. As for iTunes, I’ve already written several apps for iTunes file management. I should probably clean them up and post them at some point. What type of iTunes functions would you be looking for?
Jan 20, 2013 @ 10:16:02
Hi Billie,
Regarding Itunes there is no way of exporting albums into folders. So if you used Itunes for years on your mac and you want to share some songs on another kind of OS then it can become quite tricky if you did not manage your library properly (like it happened to me). That would be a useful option I believe.
syl
Jan 20, 2013 @ 10:40:06
Well, actually, if you change the setting in iTunes Keep Organized, it will rearrange your files to the correct folders based on Artist, Track number, etc.

At that point, you can just grab the folders you want and they would all be there. Of course, this is all based on if you have those ID3 fields filled out on each track.
For that, I would suggest TuneUp!
Jan 20, 2013 @ 13:19:54
Thanks for the itunes tips. it is exactly how I configured it now.
Coming back to the Aperture info you gave earlier by saying “which I think can export in the manner that this app does for iPhoto” : How do you tell aperture to export several projects saved in the aperture library into a simple folder named with the name of the project?
Jan 20, 2013 @ 14:02:58
I tested aperture a bit more and i think I understand now what you meant. Indeed aperture can manage to export several projects at a time into folders with the name of the project. On the “plus” side I would say that it can manage RAW files, so I can export all my originals pictures.
Thanks again i think i have an alternative solutions now for all my RAW pictures.
Jan 21, 2013 @ 20:17:57
Looking for this good one a long time. As iphoto sucks always and it’s quite time consuming to tackle with iphoto’s indexing bugs and hidden structure. Thanks for it.
Feb 01, 2013 @ 11:14:40
Thank you soooooooooooooo very much!
Feb 01, 2013 @ 12:07:48
First of all -- thank you!
I have a small problem that I can’t identify
When I start the script i copies the first 2 events and them this comes up
http://Pictat.com/show.php?i=/2013/2/1/40610screenshot.png
Feb 01, 2013 @ 15:31:14
Take a look at http://soniq.org/soniq/15749/iphoto-export-all-events-to-folders#comment-943 which should answer your issue.
Mar 12, 2013 @ 15:43:54
Did NOT Fackin work as advertised!!! I had 98 events and now I only have 1!!!!!!! Stupid freakin me not backing up my library before trying this!!
I’m going to have to spend HOURSSSSSS to get it back the way it was!!! FACK!!!!!
Mar 17, 2013 @ 12:31:00
Great script. As always, there is just one more thing that would be nice to have. This is probably asking for a lot more complexity but it would be nice if a parent folder could be created with the year, i.e. “2011″ with all the relevant exported events inside.
Never hurts to ask
Mar 17, 2013 @ 14:03:28
I will certainly look into that, shouldn’t be too hard to handle that in the code.
Mar 17, 2013 @ 14:05:45
This application does not actually alter the iPhoto directory, or modify data within iPhoto. As far as utilizing iPhoto -- it only reads the XML structure to copy the files from your iPhoto Library to the location you specify. There is no portion of the code that writes to, or deletes, the iPhoto Library itself.
Apr 11, 2013 @ 21:36:44
Hi Billie,
I am frustrated beyond belief. I want to extract photos from iPhoto with the photo creation date to appear in the Date Created / Date Modified columns when viewed in Finder.
For some reason every application I use always seems to get the date that the photos were imported into a iPhoto Library.
For instance I have a photo with create date of 17/3/2011 7:45:28am but always get 15/7/2011 10:49pm (iPhoto Library create date). Interesting your application correctly applies the date for *.mov files but NOT the JPG files. Why is this so?
Otherwise I like your very simple easy to use application.
Regards Bob
Apr 12, 2013 @ 15:16:09
Bob,
This app will attempt to retrieve the EXIF data from the image or file first, and if it cannot, it will grab the only date it can, which is the iPhoto import date or iPhoto create date. There is no way that I am aware of to change that behavior, as the image is pulled from the iPhoto XML, not the file system. MOV files ignore that information because they don’t conform to EXIF standards.
Apr 28, 2013 @ 08:05:47
This is exactly what I’ve been searching for to free my picture from iPhoto but getting the error -- “The operation couldn’t be completed. (OSStatus error -67049.) “
Apr 28, 2013 @ 10:07:36
I receive an error as soon as I start the export application:
Traceback (most recent call last): File “/Users/chip/Library/exportiphoto.py”, line 8,in import io ImportError: No module named io.
I’m running OSX 10.5.8 with iPhoto ’08 7.1.5.
I’m guessing this is dumb user error. Are there any prerequisite applications I need?
Apr 29, 2013 @ 08:29:44
The application should verify if you have everything you need, however, it does require a current version of Python. This normally comes installed with OS X, but yours may be out of date.
http://www.python.org/getit/mac/ will have the instructions on how to update your python libraries.
Python 3.3.1 (April 7, 2013)
Python comes pre-installed on Mac OS X, but due to Apple’s release cycle, it’s often one or even two years old. The overwhelming recommendation of the “MacPython” community is to upgrade your Python by downloading and installing a newer version from the Python standard release page.
http://www.python.org/download/releases/
If you are using Mac OS X 10.5, see the Leopard wiki page for detailed information.
http://wiki.python.org/moin/MacPython/Leopard
Apr 29, 2013 @ 08:32:11
You can get My App running by opening System Preferences, opening it’s Security and Privacy pane, and choosing to “Allow applications downloaded from anywhere”.
May 02, 2013 @ 13:58:37
How hard is it to alter this to include the dates in the folder names? Or to do a Year>Month>Event structure (that would be preferable since that’s how I have arranged my photos outside of iPhoto -- I only use iPhoto for my iPhone for the most part. I organise my other photos as I import them.
May 02, 2013 @ 15:33:34
Two answers:
1. It wouldn’t be that hard to add that to the code. I could likely do that.
2. If you’re not using iPhoto to manage your photos, you might just be better off using “Image Capture” for your iPhone.
Using Image Capture:
Connect your camera or card reader and launch Image Capture, if it’s not already open. You’ll see thumbnails of all the images on your camera. Click on the shot you want, use the Import To pop-up menu to specify where you want it saved, and then click on the Import button. (Don’t be tempted by the glowing, blue Import All button; that downloads the entire camera roll.) You’ll get the full-resolution photo—along with any metadata and GPS coordinates—in the destination you chose. If you want multiple images, Command-click on the ones you want and choose Import. This is also for a great way to download your iPhone videos, which appear alongside the still photos in Image Capture.
May 02, 2013 @ 20:46:02
No pressure obviously but if you did happen to do it -- I would more than happily use it
It’s funny -- I always used to use Image Capture until I got my iPhone and then I just figured it was easier to use iPhoto. Fast forward a few years, I started to realise how much I wanted to use a completely different program like light room to catalogue/edit images and iPhoto turned into an even bigger hassle than when it was just the huge database that refused to back up properly to my NAS. All my DSLR images are well organised outside of iPhoto, thank goodness. So it’s just about 5 years worth of iPhone shots. Only 120 GB
Yeesh. With all this reorg i’m doing, my next back up will take forever.
May 03, 2013 @ 08:41:32
I’ve updated the Application. Give it a try.
May 03, 2013 @ 10:22:36
It would seem that it is working perfectly -- that’s so great. Thanks so much!
May 03, 2013 @ 10:46:23
It would also seem that I took some pictures in 1949 and then again in 1951 on a plane. I’m a pioneer of technology I guess! All the other dates work fine though -- I must have messed up the EXIF data somehow on those ones.
May 03, 2013 @ 11:28:56
One last comment, I swear this is it. Final output Had 17,769 items vs the Master Folder’s 17,587 items and it was overall a little smaller in size (which was actually odd because I noticed that in a side by side comparison the exported files were often a few bytes larger than the original, although I hardly did a full fledged across the board library comparison so whatever) any idea where the discrepancy might have occurred?
May 03, 2013 @ 12:37:53
Nevermind -- I think I figured it out. The difference in size was about the size of my current trash. Since iPhoto leaves the pictures from the trash in the masters folders and I am guessing your script sorts them out, I was left with less size in my export folders. Still don’t quite understand having more items but perhaps thats just from having a bunch more folders than I did in the masters as well.
May 08, 2013 @ 10:27:40
The reason you have more items in the exported folders is based on how iPhoto associates a photo to an event. Because a photo can be tied to an Event AND a Folder AND a Roll (whatever terms they use on whichever version) -- the app has no way of deciding for you on which to link the photo to, so it puts it in both/all places. This can result in duplicates.
May 19, 2013 @ 18:09:00
Thanks very much! This was a huge help