Mac OS X Lion / Mountain Lion Photo Booth Plist Rebuild/Repair Script
A while ago I upgraded from an aging MacBook Pro to a much more nubile MacBook Air. Delighted with the Air in every way, the only problem I encountered was the backup of the MacBook Pro I made I sold it was seemingly corrupted and would not mount.
I did though have a backup of my Photo Booth Photos and wanted them recognized by the application. Admittedly, it is simply a matter of entering them into the Recents.plist file, but having several hundred photos across three operating systems and three naming schemes (was that really necessary, Apple?) getting these into the proper order by hand would have been a huge burden.
Alas! A use for my PHP skills! I sat down and wrote a simple PHP based shell script you can use to create a new plist file with your images properly ordered.
This will back up your current Recents.plist as Recents.plist.bk.[time] so if you decide to roll it back, it will be there for you!
To Begin With
- Ensure all photos and movies you wanted loaded into Photo Booth are located in your Pictures/Photo Booth Library/Pictures/ folder.
- Ensure the Photo Booth Application is closed to avoid overwriting our changes.
Added September 10, 2012
Open Terminal and run the following command.
curl -Ls https://raw.github.com/gist/1108691/Photobooth_rebuild.sh.php | php
git clone https://gist.github.com/1108691.git PhotoBoothRepairshould both download it and set it executable.
- Save the script somewhere accessible to you via Terminal.
- Navigate in Terminal to the directory where you saved the shell script
- Set the file executable by running
chmod +x Photobooth_rebuild.sh.php
- Execute the shell script
- All Done - Fire up Photo Booth to see our results!
- All Leopard format names arrive first simply for lack of anything to go on as they’re just numbered.
Please comment, I welcome feedback! Feel free to fork this code on Github - I'm open to any updates. I wrote it for my personal use but have been very pleased with the number of people that it has helped!