I am both a photographer and computer service provider and often called on to solve photo management problems. Recently one client came to me with a problem of accumulated duplicates in Mac OS X. Over the years, transferring between computers and doing upgrades, many copies of iPhoto and Photos libraries had accumulated with many redundant copies of photos.
To make matters worse, the copy operations had left the files stamped with the time of copy, not the original capture time. This also happened as photos were edited in iPhoto. They were distributed in Year—month—day folders that made browsing extremely slow in the OS, constantly changing between single-date folders that had a few photos each.
You know that problem too?
The client was not a power user and did not want to use Photos or Lightroom, instead they wanted simple browsing with cloud-based viewing from any device and integration of photos from the iPhone.
First, I used Photosweeper to eliminate duplicates. This reduced the collection to about one-third of its original size. This left the photos in countless Year—month—day folders spread over several de-duplicated libraries. I needed to get the photos out of these folders and grouped by year. They could automatically sort by month and day within each folder, making for a more streamlined browsing experience. Ideally I could get them sorted by year of capture and not time of copy.
Hazel to the Rescue
Hazel is a Mac OS X utility that installs into the System preferences. It can watch individual folders and perform a powerful array of operations, based on conditional rules that you set. It kicks into operation any time a file is added to the watched folder. The screenshots show some of the conditions and actions available.
The first step was to get all the photos out of the individual date subfolders, without opening each and every one. Hazel has a “Go into subfolders” rule that allows for processing subfolders recursively.
Now for a super-strength of Hazel: Hazel can execute shell scripts on the files. Thanks to a script supplied by Federico Viticci, we can peer into the EXIF metadata, read the image capture date, and re-timestamp the file with that date.
This was followed by a “move file to folder” rule. These rules were enacted on a temporary transfer folder. The photos were moved to a photos master that serves as a “landing” folder for sorting. The timestamps now match the image creation date.
In the master Photo folder (The paid version of Hazel can watch many folders) Hazel then steps in with a “sort into subfolders” rule and I specified “by year.” Hazel creates year folders as needed.
Once the rules were created and tested, it was a snap to carry out the operation. I simply grabbed a de-duplicated folder full of date subfolders and dumped it into the transfer folder. Hazel got to work, spawning many notifications as files were renamed, moved, and sorted. I went on to other tasks while this work completed, periodically dumping in a new folder.
Now the photos can be browsed in large numbers by year. I suggested using Lyn, a lightweight but feature-rich image browser. It can show all metadata, unlike Photos. The owner can sort them into folders with identifiable names as projects arise or time permits.
But Hazel’s work is not over.
Now we will integrate the photos from iPhone, with the help of Dropbox. Dropbox will upload photos from a tablet or smartphone to the Camera Uploads folder, which is then synced to the laptop. Hazel watches the laptop’s Camera Uploads folder and moves them to the master folder where they are sorted to year.
Hazel is a diligent, ever-watchful master of file operations at your service 24-7. It is a great tool for many file management workflows.