Monday, 27 April 2009

A reverse date prefix file and folder naming convention

I always used to name files and folders randomly. I never followed a particular convention of any sort. One thing I did like to do was to include the date I worked on the file in the file name, but I never thought of this tip until recently - I'm sure it's not a completely original idea, but it makes complete sense to me.

What I now do (for pretty much every file that I work with) is to put the date at the beginning in reverse in this format:

YYYY-MM-DD filename.ext

What this does for me is the following:

  • Sorting by the file or folder name quickly sorts chronologically
  • Any desktop search you use can quickly search on the date in the title
  • I can easily scan through the list of files and see how they interrelate in time
  • If I change the date every time I make a change I can see when I last made an update
  • Following on from the point above, it enables me to keep a very simple version control system which is extremely easy to maintain
I use this for all files except my media files. For music, I let iTunes manage the naming. For videos, I just name them (apart from home videos, which I use the date format). However, I go a little further with my photos…

After a long holiday and multiple photos from different cameras, I realised that making a universal slideshow would put everything in the wrong order unless I used a chronological naming convention. Hence I took it a step further and used this format:

YY-MM-DD-HH-MM-SS (orginal photo number).ext

I reduced the year to two digits (to keep the file name a little shorter). I also did away with any description of the photo as it takes too much time to write. The folder gives the date and the general content which is good enough unless you are doing something specific with the photo.

The great thing about this was that using the excellent (and free!) piece of software Bulk Rename Utility, I was able to do this right from the context (right click) menu. But that will be the subject of another post as it really is an indispensable utility for the file-naming-obsessed-geek, albeit a rather complicated looking one on first principles:

If anyone else has any useful hints on file naming conventions they care to add, please let me know in the comments section below as I'm always trying to get more organised. For me, simplicity and effectiveness are the key measures of success.