I am trying to move my library of photos (over 12000) out of iPhoto for use in Adobe Lightroom and would like to include the GPS data I've added to the photos using iPhoto's in-app feature (This data is stored in Apple's proprietary database, not as metadata in the photo itself). I can transfer the data by exporting but I want the original RAW files which iPhoto won't modify. So my proposed solution is this:
1) Export all original RAW photos into a directory tree sorted by event name. 2) Export all photos as JPEGs with the GPS data embedded in the EXIF data (as iPhoto can do). 3) Use "exiftool" to pull the GPS data from the jpeg and copy it in to the matching raw file.
I can do #3 one photo at a time with the following command:
exiftool -overwrite_original_in_place -tagsFromFile ~/Photos-Mod/Event001/photo001.jpg -gps:all ~/Photos-Orig/Event001/photo001.NEF
The Photos-Mod files have the GPS data from iPhoto, and Photos-Orig do not. The directory tree and file names will be identical except for the main directory name and the file extension (in some cases, my original is also a jpeg). I'm hoping that there is a good way to make a script that can run exiftool on the iPhoto modified files in the Photos-Mod parent directory, and move the GPS data to the original file of matching file name and event directory in the Photos-Orig parent directory.
I just don't have the scripting skills. Any help here would be hot.