Aperture AppleScript – Export & Restore Metadata
Aperture can export *some* of the metadata associated with your images quickly & easily. It can’t, however, reimport that data nor can it export all of the metadata from your images.
Hence these AppleScripts.
The first one will export the metadata for all selected file. It will save the data to a text file with a header row so that you can determine what data corresponds to what column (easy import into database or spreadsheet). It will export EXIF, IPTC and some custom metadata. You can customize the order and determine what fields are exported by editing the ‘theIPTC’ variable list.
export-metadata-to-file-06scpt1
The second script will read an export file (with header) and apply metadata to images based on their name.
restore-metadata-from-file-06scpt1
Technorati Tags: Aperture, AppleScript

This post has 10 comments
April 7th, 2009
Hello, your script seems exaclty what I am currently looking for. But it’s not clear how to install it inside Aperture so that it can export custom metadata from within the application. Thank you very much for clarification.
April 8th, 2009
You can run the script from within Script Editor or from the Script menu item. You can enable the script menu by opening the AppleScript Utility (/Applications/AppleScript/) and checking ‘Show Script menu in menu bar’ – this will show a little scroll icon in the menu bar. Then open Aperture and activate the Scripts (scroll) menu and choose Open Scripts Folder > Open Aperture Scripts Folder. A folder will open in Finder and any AppleScript you put in there will show in the Scripts menu.
April 8th, 2009
Thank you for your prompt reply. Unfortunately, this has corrupted the chosen file and I had to remove it from Aperture, then find it back from backups and re-edit metadata… I really don’t understand what has happened.
April 11th, 2009
Ouch! The script should not be able to corrupt a master file. It only reads from and writes to the Aperture database. Perhaps your Aperture database is damaged. You can rebuild your Library by holding Command-Option when you launch Aperture. Sometimes that can really help when things aren’t quite working right.
October 22nd, 2009
Hi.
Thanks for this – it could be very useful….
However, having tried the export script it doesn’t seem to do anything after the images in a project are chosen. No text file I can find is exported.
Could this be relevant:
set srcFile to choose file
– set srcFile to alias “BG_MBP2:Users:brett:Desktop:Aperture-Metadata.txt”
Is this specific do your desktop and does it need to be changed?
Thanks, Tim
February 1st, 2010
Thank you very much…
June 8th, 2010
Hi Brett,
I’m tring to manage ten thousands plant picture in aperture 3.0.3. It’s really useful to add custom field in metadata that helps me to do classification. But it bothers me that exporting metadata doesn’t work in my case. Whatever I use your script or menu in aperture, The output file(.txt or .csv) only have data in two columns, include the version name and another are meaningless 0,1, while the others is blank with a header. Would you show me how to solve this problem?
BTW, I shut in RAW and transfer them into exif-jpg in DPP(CANON).
And I love your restoring scripts. Is that means I can input the infomation in spreadsheet then import it to image?
June 18th, 2010
I haven’t tested my metadata export scripts under Aperture 3 yet. As some metadata field names have changed, I suspect that the export may fail – or as you are seeing generate bad output. Unfortunately I never did get around to making those scripts as robust as I had intended.
The reason I wrote those scripts was to get custom data out of Aperture so that I could back it up in a more portable format- and get that data back. I have since moved away from that strategy and am now using Chronosync to make a small, targeted backup of my Libraries (excluding the big stuff like thumbnails, masters, and previews).
August 6th, 2010
Hi Brett,
Incredibly useful script for getting the metadata that Aperture doesn’t export (like lens model) to JPegs. I’m completely new to Applescript and wondered if you mind telling me how you script could be altered to output to individual files. For example create “image1.txt” for “image1″ in the library and so on. Many thanks for a brilliant place to start.
August 12th, 2010
Ken- Your email address bounced, but I had said that I’d like to try to build the script that you’ve asked about. I’ll see what I can do… stay tuned