Over the (many, many) decades, I've taken quite a large collection of digital photos, with a multitude of cameras. But, even within the same brand of camera, the naming convention continually changes... frequently starting over with previously used naming conventions. This makes it far too easy to inadvertently overwrite older photos with new photos of the same name. The often obscure names also make it difficult to find a specific photo or sequence of photos. I've tried various versions of Apple's Photo apps over the years and, while they do offer some advantages with indexing of various criteria, the formats over the decades often leads to the loss of files due to the risk of replacing an old photo with another of the same name! So, long ago I developed my own method for naming, categorizing, indexing, and retrieving a specific photo as needed. This allows me to instantly find images based on the year, month or specific date anywhere on my computer and/or its attached drives. And it prevents the possibility of losing images due to overwriting image files with duplicate names.
The method is straightforward... I simply prepend the Y2K date to every photo as it's imported from the camera, based on the date/time it was taken. As such, it doesn't matter how many photo have the same "base name", since they will each remain unique based on the date/time they were taken. Photos taken on Sept 6th, 2023 (with various cameras) would all be renamed as follows...
"IMG_12345.png" ==> "20230906_IMG_12345.png
"7722268.jpg" ==> "20230906_IMG_12345.jpg
"P1234567.png" ==> "20230906_P1234567.png
I don't change anything else in the filename (case of extension, base name, etc). The various cameras all increment the filename, as required, but duplication of names is virtually impossible. (Adding the time to the string would further reduce the risk of duplication, but I've never had an issue that required this.)
I used to use the app "File Buddy" to do this quite easily. But, since this was a 32-bit app, so it will not run on the newer, 64-bit OS versions. I really miss that app! (I still keep a 2015 MBP alive, running under "High Sierra", for the use of that app and for Photoshop CS6, etc.)
I use "Keyboard Maestro" for various routines, but not frequently enough to be really proficient (yet). I recently created a KBM macro to rename my photos, and it works quite well. I implement it based on the use of "For each path in the Finder's selection".
While the routine works quite well, as is, I need some suggestions as to how I might avoid some possible issues.
I ONLY want to use this on IMAGE files. (Check for extension, filetype, etc?)
I DON'T want it used twice on a given file. (Search fist 9 chars of filename for "yyyymmdd_" format, and skip if it matches?)
Perhaps I could ONLY allow it to run in a given folder that's used specifically for that purpose.
Any suggestions or example routines to validate above checks?
Thank you for any feedback!