Vox Populi: Best practices for file naming

If it wasn't apparent from my pathetic cry for help the other day, even I -- one of your more theoretically productive persons in North America -- struggle with what to call things.

Tags, files, and -- dear Lord -- the innumerable assets associated with making web sites, graphics, audio, and video projects; it's all a hopeless jumble unless you have some kind of mature system in place for what you call your stuff and its various iterations. Of course, if you're like me -- and I hope that you are not -- you still have lots of things on your desktop with names like "thing-2 finalFinal! v3 (with new changes) 05b.psd".

For prior art, I still treasure this Jurassic thread on What Do I Know where people share their thoughts on this age-old problem, but, frankly I haven't seen many good resources out there on best practices for naming.

Anyhow, during a recent MacBreak shoot, I noticed that Alex and his team seem to have a pretty fly system for naming the video files that eventually get turned into their big-time IPTV shows. Thus, I turned to Pixel Corps' Research Division Lead, Ben Durbin (co-star of Phone Guy #5) for insight and sane help. And, brother, did he ever give it to me (see below the cut for Ben's detailed awesomeness).

But, just so I don't lose you, do give me your best tips in comments: What are your favorite current conventions for naming files? How does your team show iterations and versions? Do you rely more on Folder organization than file names in your work? How have Spotlight, Quicksilver, and the like changed the way you think about this stuff?

We're still settling into best practices that are shared amongst all the teams, but here are some themes:

File names are a set of fields separated by underscores. We share files on linux servers, so while manageable, we consider spaces in filenames to be lowercase b bad.

If it's an established or long-term project, we try to keep the codes for the various fields to three letters. This allows for more fields without having the file names get too long.

If it's not an established project, we favor readability (longer field names) and consistency. Even if your field data are arbitrarily chosen, as long as you're naming things consistently, you can always use batch renaming to convert a given field into a code later.

When possible, the fields are arranged left to right from general to specific.

Files that may have iterations get a three-digit, padded iteration number as their final field.

Even when we use folder structures with multiple subfolders, the project code fields stays as a prefix of all files, so that if files get misplaced, they're still easily findable (example: all post files for a MacBreak episode will start with "mbk_eps_episodeNumber_" regardless of where they sit in the folder structure).

Caveats:

As you've probably noticed, the problem with file names in general is that they only give you a single "view" and aren't applicable to other ways in which you might want to see/sort the files in other contexts. Advanced users can get all grep-daddy with it, but they're in the minority. At best, file naming structures are a "good enough" solution that works well most of the time if you don't have a more robust metadata system in place.

The problem with metadata systems, of course is that they tend to either be proprietary or only applicable to certain file types. Are we going to use annotations on all of our Quicktime movies? Create some custom xml format that gets parsed by a proprietary app? Structured Spotlight comments? The check-in comments of a versioning system like Subversion? The lack of a good, widely-accepted metadata framework that is spoken by all OSes and/or that can be embedded into most file types lead many people to resort to file naming structures and leave it at that.

Dang. Thanks for that, Ben!

To repeat:

What are your favorite current conventions for naming files? How does your team show iterations and versions? Do you rely more on Folder organization than file names in your work? How have Spotlight, Quicksilver, and the like changed the way you think about this stuff?

If you think you have a filename convention problem, it is more likely that you in fact have a subdirectory structure problem.

Agreed. Maybe it's just because I've been using computers since I was a kid -- My first Macintosh was a Mac SE, God how time flies! -- but the idea of simply nesting folders as needed has been my organization scheme.

It's a lazy system, but if I get more than three or four things in a folder that have some logical grouping, they go into a subfolder (or possibly a sibling folder, depending on context). Three or four folders that have a logical grouping get their own subfolder. I regularly refactor my directories and subdirectories, and it seems to work.

Documents looks like:
Gaming
Gaming > Dungeons & Dragons
Gaming > BattleTech
PDF Receipts (this is a target for the PDF output option in print dialog; if I do some web-based transaction, I print-to-PDF the receipt/confirmation number page that results)
PDF Recipes (same as above; I like browsing recipe sites, and don't want to bookmark every cool thing I find)

43 Folders is powered by Drupal, which rules. The site was designed and made wonderful by the astounding Chris Glass. Ben Durbin is the sine qua non and our personal consigliere. 43f’s web hosting is sponsored by A2.