As mentioned in my previous article on image storage guidelines, each file in your collections of images should have a unique filename. It’s time to talk about that some more:
You generally should NOT leave files with just their original camera-generated names. The standard “DCF” (Digital Camera Format) names have 8 characters, with the last 4 being digits (for example DSC_4756 or _IMG3921). You generally should set your cameras to “continuous” file numbering (so it doesn’t reset the number to 0001 on each card format) but even then the camera can’t guarantee that the filename will be unique. The camera is just trying to make sure that the filename is unique ON THAT CARD, but once you copy the file to your computer there’s no longer any guarantee that the filename is unique.
Eventually the file number will wrap around back to 0001. You might be putting the new files into a different folder than you did 10,000 photos ago, but if you ever end up reorganising your files (e.g. making a collection of your favourite portraits) you might end up with conflicting filenames trying to be in the same folder. Also if you use a second camera (your own, or just a borrowed one) that camera might be producing conflicting filenames. In fact if you shoot with two cameras and swap cards between the bodies in mid-shoot, you can almost guarantee that you’ll get the same filenames from each camera.
EOS 5DmkII, 24-105mm/4 (A2_020052)
In the previous article I wrote: Long filenames don’t matter (within limits). When was the last time you used something other than pointing and clicking to open a photo file? Having unique filenames does matter.
While modern filesystems have for decades been able to cope with very long filenames, you can still today come across applications that have problems with this (including truncating your carefully-constructed filenames!). To avoid problems you should keep your filenames to no longer than 31 characters (not including the extension such as .TIF).
You should also avoid using ANY other characters than
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789_-
No spaces, no quotes, no periods (“full-stops”), no colons. Only the above characters. You may be using a Mac today, but at some point in the future you may need to recover your backups onto a different computer, so your filenames need to be accessible on all systems. Obviously the same will apply to any folders you use to organise the files.
EOS 5DmkII, 24-105mm/4 (A2_019991)
A common choice for constructing filenames is to extract the photo date/time from the EXIF data, and combining this with the camera-generated filenumber (note that using the hours and minutes along with the date is usually enough: you’re very unlikely to be generating the same camera filenumber within the same minute!). I’ll talk about how to do this below, but first we need to think about what we’re trying to achieve.
For example DSC_4756.NEF taken at 3:45PM on the 26th of January 2008 could get renamed to 200801261545_4756.NEF. By omitting the DSC_ from the name we’re able to make the name a bit shorter, but you could leave it in there if you preferred.
Note that using the date/time in this order (YYYYMMDDhhmm) means that if you are navigating your filesystem with a browser such as Finder (or Windows Explorer) the filenames will be conveniently sorted by default into chronological order. It should also be obvious that if your camera is set to the correct time that will increase the usefulness of these names!
Some people like to prefix this name format with their identifier so they can distribute copies of files and have it obvious whose photos they are. For example if I used DBP (for David Burren Photography) the file might be called DBP_200801261545_4756.NEF
Note that the length of this filename is 25 characters, leaving just 6 characters before you hit the 31-character limit mentioned above. So a PSD file derived from this might be named
By keeping the base filename the same but adding a suffix it’s easy to ensure that the new filename is also unique. The association between the source and derivative files is also easy to see. Naming the new PSD something like TwoBirdsOnBeach.psd wouldn’t help on either count.
To save on characters (maybe that versi above was trying to be version) some people will only use two digits of year (e.g. 0801261545_4756.NEF) although if you also have photos from last century in your collection that might get confusing.
Some people use a sequential counter to assign filenames rather than relying on the combination of date/time and camera file number, but you need to be careful that the counter is in fact sequential and never repeats the same number (especially if you use multiple computers and/or ever reinstall your computer). A variation of this could be to have a “job number” (call it XXXX) and use a format such as DBP_XXXX-yyyy (where yyyy is a sequential number starting at 1 for that job. That way you only need to remember the next job number (although there is still room for error).
But however you generate your filenames doesn’t matter as long as they’re going to be unique. Having consistency in your names will of course make things tidy…
Renaming the files as soon as they’re copied to your system (or as they’re copied to your system) and giving them unique filenames is your best option. Once each original image has its own filename, other images derived from those originals can inherit the name simply modified by the addition of a suffix to keep it unique. Rename early, rename once.
In my own setup I use a combination of date and unique number. I have it set so I can download a card and assign the files unique names without having to manually set the job number or sequence number for each card. Insert the card, initiate the download, and you’re done.
Software can do the renaming for us (as long as you choose a suitable format: some software packages are not as flexible as others). If you are reorganising an existing collection of images you will want the functions to rename files in place, but for new images you will want the rename-during import functions.
Generating names in Lightroom
Lightroom has a Rename Photo function available in the Library module, and it uses Filename Templates to define the filenames. When importing files, if you select the option to copy files to a folder on your hard drive it also uses Filename Templates to define the new filenames.
The example on the right is using a photo file originally called IMG_0294.CR2. You can build a template that uses fixed text as well as fields extracted from each photo’s metadata to create new names. If you’re naming a group of files in one operation, you can use the Sequence field to allocate consequtive numbers. It will allow you to choose the starting number, but it is easy to forget to change the number (or even what to change it to) and thus end up re-allocating the same numbers. This is discussed above, and an example screenshot is shown below.
Once you’ve set up the template the way you want it you should save it as a new Preset, allowing you to quickly access the appropriate name format from either the Rename Photos or Import Photos dialog.
When Lightroom renames a file it stores the original filename in its internal originalFilename metadata field. This can be useful, but take note that if you rename it a second time the original name will be lost. Incidentally, Filename Templates are also used in the Export function to generate the new names of exported files.
Note that if you’re renaming files in your database as part of an overhaul, if you do it outside Lightroom it will get confused and not know where the files it was managing went to. Doing the renaming (and any folder reorganisation) through Lightroom lets the catalog keep track of the files.
Generating names in Bridge
Adobe Bridge is a file browser (but one with very good integration with the Photoshop and Camera Raw – and thus with Lightroom if you export metadata to file XMP data).
Under its Tools menu is the Batch Rename function, and as you can see on the right you can build up similar name structures as you can with Lightroom. In some ways it’s less flexible than Lightroom, but you can use the Load and Save buttons on that window to access a saved name format (similar to a Lightroom Filename Template).
You can use Batch Rename to rename files in-place, or as part of a copy operation. But there is also a Get Photos from Camera function that invokes the Bridge Photo Downloader. This is intended to rename photos as they’re being copied from flash cards, but it’s severely restricted in the name formats available. You can only choose from a pre-prepared list (even in the “Advanced Dialog”) and I would not recommend this as a way of assigning good filenames.
Bridge’s Batch Rename is much more useful, especially in light of the most common use for Bridge: browsing existing folders of files. But I generally consider Lightroom’s rename function to be more practical. Your mileage may vary of course…
Generating names in Expression Media
Microsoft’s Expression Media 2 (before Microsoft bought it the name was iView MediaPro) is a comprehensive program for cataloging and organising files. Not just photo files: everything. Before Lightroom I used iView to manage my photos, and I still use Expression Media to manage my video and audio files.
It has a Batch Rename function with similar capabilities to that of Bridge (although in the example on the right I was unable to strip the IMG_ portion of the original name).
Expression Media also has a function to import directly from a camera card, but its rename-on-import capability is extremely limited. You can either preserve the original names, or you can assign a new fixed string and let Expression Media append a sequence number to it. Not very flexible. Again you may be better off with the internal Batch Rename.
I’ve always used an external program to rename incoming files according to my own format and then use Lightroom and/or Bridge to manage the new files that have been copied to the drive. But you can do useful work with the renaming functions of these applications (especially Lightroom). Third-party programs such as BreezeBrowser Download Pro, Photo Mechanic, Bibble, Image Ingester, and PteroFile have similar functions, but I won’t go into them each in turn here.
That’ll have to do for today. In the next installment I will be discussing the options for organising your folders.