Return to Digital Photography Articles

Naming Strategy for Digital Photos

Depending on what software one uses to import the photos from memory card onto the hard drive, it is possible to have a wide variety of naming strategies. Most of the default file naming mechanisms will end up being very limiting. It is imperative that one comes up with a suitable naming strategy early on, rather than trying to rename tens of thousands of files later on (within the confines of whatever image management / catalog software they are using!). I had to correct the naming of several thousand photos, and it certainly took considerable effort. The earlier a strategy is adopted, the better. That being said, what are the features of a good naming strategy?

  1. Uniqueness. There will be times when you will want to move files between folders, and occasionally from multiple folders into a single folder (eg. creating a set of web-only versions). In all of these scenarios, having a file with the same name will cause something to be overwritten! Having a file name that is unique on its own, rather than relying on the folder hierarchy above it, will save many hassles in the future.
  2. Dated. Outside of organizing across some particular content characteristic (eg. pictures from an event or of a particular person), the most common way people like to organize and retrieve their photos is on date / chronological order. Having the numerical date exist in the filename offers many advantages. Of course, for images in which the date is unclear, zero-out the unknown portions (eg. day, day & month or day, month & year).
  3. Linked to photo numbers (scans only). Including the original roll and photo numbers that came with your exposed negatives allows easy back-reference to the negatives later on.
  4. Folder hierarchy. As your collection grows, it is imperative that you adopt some hierarchical arrangement of folders. This will depend entirely on how many photos you take per day/month/year.
Select a Topic
File Renaming Utilities
Naming conventions for multiple cameras / cards
Folder hierarchy strategy
File naming strategy for digital photos
Naming scheme for digital photos


Example of digital photo naming & folder strategy

The following shows an example of the final strategy, incorporating a mixture of digital photos, scanned photos, edited versions and photos from other photographers. Please see the sections below for details on the file naming and folder hierarchy details.


Sample file and folder hierarchy

What to do with photos from others?

As described in more detail under the file naming strategy section below, I treat other people's files in the following way:

  • Digital photos from others - Rename file with EXIF date pattern but use the optional photographer ID code in the filenames.
  • Film scans from others - Attempt to rename with approximate date pattern and roll plus photo number, but also insert optional photographer ID.
  • Non-photos from others - Store either in the dated subfolder for the year/month or else put in the general 0000 year folder to represent non-dated entities. Preserve the original file name (so long as it doesn't start off with the 8-digit prefix). These are what I call uncontrolled files.


Reader's Comments:

Please leave your comments or suggestions below!
 I used to have similar problems too, but after using
"long path tool" You can use to solve this problem.
2013-01-12Jeff Z
 I've been following these articles (and comments) for years. This site has one f the best discussion on the subject of naming convention I have ever found. (long time listener, first time caller)

My question revolves around the archiving of movie files. How do you keep movie files concurrent with photo file naming if the file naming is derived form the EXIF information? and... do you keep movie files with photos for the purpose of archiving and naming?

For Photos I use: YYYYMMDD-HHMMSS-[Camera Model ########]-[original incremental ####]

( my only problems have been with cameras with very long model names)
 Great question Jeff! I experimented for a while keeping movie files separate from the image files but in the end preferred the arrangement of co-locating the files in the same directories. I didn't find many benefits to separating out the files (except perhaps for backup purposes if the videos were large and I had deemed them not worthy of including in the backup set). Unfortunately, there is a wide range in video file formats captured by digicams and camera phones that the file-naming and date-stamping are most easily accomplished by an image downloader application (such as Downloader Pro). These programs will usually detect the embedded metadata that encodes the video capture date/time even if it isn't encoded within the EXIF format (see below).

The file naming can generally follow the image numbering rules (when using a downloader), but with a different extension. Your scheme of placing the camera model in the file name can certainly work, but I found it more manageable to specify a two-character code to represent the camera model (and have the downloader program detect camera model or serial number and automatically match it to a two-character code).

FYI -- some of the ways in which date/time is captured in video files:
  • Canon SD870 digicam: AVI file format (.AVI contains a Timestamp field in the RIFF format, and often it is accompanied by a .THM thumbnail which also has full EXIF info)
  • Sony DSC-HX5 digicam: AVCHD file format (.m2ts video stream accompanied by .modd file which has a DateTimeOriginal field in the XML)
  • iPhone 5: QuickTime MOV file format (.mov has movie header atom which contains "Creation Time" field).
2007-10-26Broddi RH
 Thanks for running a very interesting site about dark side of digital photography. So many pictures and no way of finding them later ; )

I was thinking if it is not practical to use the file name more. Basically fill it with information. For example:


or in a formal way: keyword_keyword_keyword_date_number.jpg

this is 41 bytes, and if I'm not wrong the NTFS file system can hold up to 256 bytes for file names. The only problem I see now with method is when I burn files to cd or dvd the Joliet standard can only hold 64 bytes in the file name (+ path).

sorry for any errors in the text, english is not my primary language.
 While that might sound like a good idea, it generally doesn't work. There are several issues:
  • You would want to limit the choice of keywords to a consistent set, and deciding this in advance is extremely difficult. Inevitably you'll decide to change the keyword choices you made, and this will involve renaming many files!
  • Incremental backups will be broken anytime you decide to change a keyword, as the file will appear completely different to the backup software. Images handled by an image database with keywords wouldn't have this problem.
  • Ideally, you'd need to be consistent about the ordering of keyword1, keyword2, keyword3, for example. E.g. is it family_horses_germany, germany_family_horses or horses_family_horses?
  • Because of the previous point, sorting by filename is no longer consistent.
  • The number of keywords you can apply is very limited
  • How do you handle hierarchy or flat keyword trees?
  • ... and many other issues you'll eventually run into!

One scenario where it can be helpful to include some additional information in the filename is when photographers shoot for a variety of clients -- in these cases putting the client name in the filename can useful.

Hope that helps!
2007-05-11H Warren
 Any tips for someone who still needs to use 8.3 naming? Reason being we have mac users and pc users accessing the same library and somewhere in the ether between the two, longer names get lost on the macs. File names have to be descriptive though, as our designers get confused if not!
 With 8.3 naming, you are very much limited in what information you can provide in the filename. This is all the more reason to be careful about how you select the information. Most importantly, you will still want to keep the .3 (the extension) as a valid extension such as .jpg.

This leaves you with enough space still for a date-based filename or just a sequence number. The goal should still be to keep a unique filename for each photo, irrespective of the directory structure.

Some ideas:

If you never shoot more than 999 photos in a day, then you could consider using a scheme such as:
  • YYMDD###.JPG - M represents the month, but with only a single digit. So, I would probably use a scheme like 0-9 for Jan-Oct, then A for November and B for December. Unfortunately, very few batch renaming scripts / programs will automate this.
  • YMMDD###.JPG - Y represents the year, but with only a single digit, it obviously won't handle more than 10 years' worth of photos very well.
  • YYDDD###.JPG - In this case, the three-digit DDD is a day number from 001-366. In my opinion, this would be the best option. Downloader Pro can do all of this renaming with the %y%j%r3 token string (the %j token gives you the Day-of-Year 3-digit code).
Given your tight limitations, I would strongly suggest against any attempt to attach meaningful / descriptive names to the filenames. Most important should be a rule of keeping filenames unique across your file hierarchy. Failing to do so can lead to many problems down the road (everything from backup, duplicates, etc.). If you really wanted to try to leave some of the 8 digits for description, you're going to have a very tough time keeping the files appropriately named. More importantly, you are not going to be able to automate the process.

Good luck!
 Could you give me a comment for my naming convention?
Folder: \[2 digits code]-YYYY\YYYYMMDD-location_event\
Filename: [2 digits code]-YYYYMMDD-[camera generated serial number]
The 2 digits code could be a combinations of letters or numbers. This could indicate what camera and/or media used (eg. digital/film) to take the picture, the author/photograper.

Folder/File renamer: Bulk Rename Utility

For the camera generated serial number, I usually reformat the memory card after the card is being used on another camera. Will this have any effect on the auto numbering? I haven't tried it myself purposedly, but it worked for me last time.
 Your folder and naming scheme sounds perfectly reasonable. Many photographers like to retain the location or event info in the folder hierarchy as you have done (or use it for a client shoot name). By keeping your camera/photographer code at the start of both the folder and filename it is clear that this is the most important distinguishing characteristic for your image collection. If you are maintaining many photos from different photographers (e.g. an agency), then this is certainly a good choice.

Bulk Rename Utility looks very reasonable, as it has collected together many of the typical functions that one generally brings into the renaming process. The fact that it provides a regex-style option as well is especially nice.

Reformatting the memory card before using it on another camera will generally have no effect on the auto numbering used by the camera (unless the camera is configured for numbering reset), as the camera also maintains the last shot number inside its non-volatile memory. So, you'll probably find that the camera starts shooting from the last shot taken on that same camera. For multi-camera use, that can lead to filename collisions, but the 2-digit code should help distinguish the cameras and avoid this potential problem.
 I have been using Microsoft Digital Image Library and now looking for other options and like ACDsee. Thoughts?

With this program I have been using just the folder structure view so therefore have not tagged any of the photos which will make this process easier (I have already gone through 02').

I will next redo the folder structure after finishing the files but want to be sure I have found the right catalog program before I start to tag.

Please explain the option to tag the file vs tagging the photo if that make sense... It seem ACDsee gives me the option to add a category then the option to actually add a keyword to the photo (will this stay with the photo no matter the software?)

I also see that ACDsee doesn't have collections, do you know what they call this something else?

Why would it be wrong to use the fodler structure in explorer as the "Collection" (Birthdays) then tag the photos (people....).

A bit of rambling here but want to make sure I have everything in order since I am spending a lot of time on this and do find it necessary.

Thank You!
 Thank you for the reply, this information is extremely helpfull!

I do wonder how there is a chance of having the same name in the future if the file is 200612 and in the future it would have 2007...?

Regarding the utilities out there for renaming the files what do you recommend.

And most importantly, is there a best approach especially if I am looking to go back through 7yrs of photos to rename?
 The chance of a name-collision is quite unlikely unless you are incorporating photos from others, or switching cards / cameras (these can cause the shot counter in the filename to jump). Otherwise, it would take 10,000 shots in one month for the counter to wrap (assuming 4-digits are used).

There is also some organizational benefit to including the day as it helps partition / arrange your files per event when you are viewing them outside of your catalog program. Looking through a directory (in Windows XP explorer, for example) with files named only with the year, month and a sequence number, it will be hard to identify which photos are grouped with which event.

Renaming can be done three different ways. The program you use will be dependent on which stage you are at:
  • Importing from memory card - My favorite is Downloader Pro, which will copy the photos, create the subdirectories, rename the files, losslessly rotate the portrait photos and a whole host of other things. Doing the renaming at this stage is by far the best option. At this stage there is no separate database that will get out of sync if you rename the files.

  • Renaming before import into catalog program - Because the original filenames haven't been imported into the catalog program yet, you are free to rename them with whatever utility you like, without fear of it messing up your catalog program's database links. For this, I have experimented with a few utilities over the years, and my current favorite is Flexible Renamer. It may not be the simplest utility, but I like it because you can use regex (regular expression) renaming, which allows you to do very powerful things, like reordering parts of the filenames, etc. For more novice users, one can use a simpler mode which is fairly self-explanatory. Unfortunately it hasn't been updated in a while.

    I plan to write up a page with a comparison of renaming utilities as it is crucial to those who need to import / clean-up years' worth of old photos. Other programs worth checking out include The Rename and MRename.

  • Renaming after import into catalog program - Unfortunately, once photos are already in a database, you are generally limited to using the renaming functions that are built into the catalog program. Most catalog programs have reasonable renaming functions, but they all differ in quality. I much prefer to do most of the batch / automated renaming prior to this stage for the fact that most implementations are far too limiting.

    That said, if you keep the catalog program open while you rename files with an external utility (not move), sometimes the catalog program is able to detect these changes and you'll be fine to do it this way. Test first!
As for recommendations of going through 7 years worth of photos -- this may be a bit of a project! The first question will be whether or not you have already processed and tagged/keyworded the photos in a catalog program. If so, then you will need to look carefully at what renaming options are available to your program. For wholesale batch renaming, I prefer to be dealing with photos that haven't been catalogged (so that I have the most in reorganizational flexibility).

In order to figure out the best strategy, you will need to ask yourself a number of questions:
  • Are most of these photos tagged / keyworded yet?
  • How disorganized is your current filenames and folder hierarchy?
  • What options does your catalog program provide you in the way of moving files / hierarchy?
  • ... detecting & relocating moved files?
  • ... detecting renamed files?
  • ... options in renaming files, autonumbering files, auto-naming files (from EXIF), etc.
  • If your files are a mess, you've already keyworded your photos and the program doesn't offer suitable renaming options, then are you comfortable writing keywords into the IPTC labels and then recovering them later?
With answers to some of the above, then you can begin at solidifying your folder hierarchy, a consistent naming scheme and figuring out how to deal with exceptions (scanned photos, photos from friends, etc.).

Hope this helps! Good luck!
 If I don't take that many pictures would it work to name the files 200612 for the month?

Also, what is the significance of the prefix (img001 given by the camera? If I have already changed this in the past how should I proceed when renaming the files?

Thank You!
 You certainly could do that, but you should always consider planning ahead. The goal of having the full date (including day) in the filename is so that you reduce the possibility of multiple photos with exactly the same filename. If you only include the year and month, then someday (in the future) you may be shooting more and end up with duplicate filenames. Remember that using multiple memory cards / cameras can restart the numbering unpredictably so this duplication scenario can occur with less than 10,000 photos.

The other benefit is that it helps keep the number of photos down in a single directory. By splitting per day, you will almost always have a manageable number, but collecting all of one month's shots may be impractical someday in the future (occasionally I will shoot over a thousand photos, in a day for example).

So, yes, there is nothing wrong with using a YYYYMM scheme, but keep in mind how your collection may grow in the future!

As for the original numbering from the camera (e.g. IMG_0001), I tend to keep this in the filename (the number only) to help keep the filenames unique. You will want to use some characteristic of the photos that can be automated (ie. don't rename manually!). Most people either take the 4-digit number from the original shot, or they generate one from the date & time of the shot using EXIF info (you would need to include the seconds).

That said, if you have already renamed the files and lost the original image numbers, there is absolutely no problem with numbering them starting from 0000, for example. Most renaming utilities allow you to rename with an arbitrary incrementing number sequence. The whole goal of this renaming process is simply to have all of your photos with a unique filename. The numbers themselves are not important. There are, however, some advantages with using numbers that roughly reflect the chronological order that the photos were taken (so that when you view the filename lists alphabetically, they'll appear in natural sequence), but this is not a necessity.

Hope that helps.
2006-04-15Steve K
  • A Content: Work / Play / Family / Other(s)/ etc
  • B Date: YYMMDD (fixed)
  • C Original photo Name (fixed)
  • D Source (fixed)(your code)

If you use the B-C-D for all photos and set content names, all duplicated will be exposed within a catorory. D is useful over time, esp if your source renames and resends. Share this with your sources.

 Thanks Steve! Good point regarding sources & renaming.
2005-09-02Danilo Cāmara

I was inclined to save the two extra digits in the year but I decided not because it would not sort the files in cronological order.


There are definitely times when a shorter filename would be better (ie. not all applications support long filenames, like the Epson P2000), but the 8+3 style is far too short. Not only would it be difficult to give any reasonable date with the photo's filename, but you would never be able to indicate any derivative filenames with it either. Shortening the year to two digits does save some, but for me the disadvantages are big: lack of sorting and more ambiguous format: is 050902 May 9th, 2002 or September 2, 2005?


Enjoying your pages (still reading the naming section), and this is a subject I've been pondering for my own similar situation for quite some time now. One quick thing I decided on long ago was to save digits and just use two numbers for the year (meaning, 97 and 01, instead of 1997 and 2001). Because as you've pointed out the file names can become pretty long if not heavily abbreviated, this is one easy way to economize. My rationale is that MY photo archive is of MY photos, or at least from my time. I'm pretty sure I'm not going to live to be 100 or better (or at least not accumulate more than 99 years of photo archives), so there no confusing that 66 might be 1866, or 2066, if you take my meaning. I don't know how this affects search issues (I'm not there quite yet, but it's next), but I can't see it being a hinderance. Besides, if I make my date string just six characters, I won't feel so bad about adding another two digit field somewhere else in my photo name string...

Just some I said, I'm still reading


Definitely! In the days of 8.3 naming, we had to be extremely efficient with our naming strategies. Nowadays, all recent operating systems support long file names. It's obvious that my strategy is not as tight as it could be from a digit efficiency perspective, with respect to the year. In all honesty, there is very little to be gained by the century index besides the trivial 2000 after 1999 issue. If one were concerned at all by the overall length issue, the area you indicate would definitely be the first place to trim it down. Thanks for suggesting the alternative!

Fortunately, working from a careful naming strategy means that it is an easy matter to someday change to another format with a simple script.


Leave a comment or suggestion for this page:

(Never Shown - Optional)