Resources for Information Management and Preservation File Naming Conventions

We’ve all been there: you’re asked to review the most recent draft of a document. You log into your organisation’s shared folders and look for the file, but you can’t tell which version of the document you should be reviewing:

  • Grant-proposal-henry-edits-finalfinal.doc
  • Grant-proposal-final-Julia_edits_v4.doc
  • FINAL_proposal_Aug2016_kct-updated.doc

This is just one small example of an information management weakness that can cause a lot of unnecessary frustration. The more organised we are in managing information, whether it’s documents, spreadsheets or multimedia, the more effective and efficient we can be in our human rights work. This is why file naming conventions are so important.

A file naming convention is a systematic method for naming files that will make them easier to retrieve later. A consistent and descriptive convention will allow you to:

  • Know the content of a file without opening it
  • Find and identify files even if they are no longer in their original folder
  • Easily browse long lists of files to inventory or check if any are missing
  • Manage files more easily, even when they’re all stored in one central folder or directory

Designing your file naming convention

A filename can be made up of a series of descriptive elements, such as keywords, dates, identifying numbers, etc. To design a file naming convention, you must decide which types of elements should be included and in what order.

For example, a file naming convention may include the following components, in the following order: [YYMMDD]_[Project]_[Location]_[Event].xxx

Examples of filenames based on this example convention might be:

  • 160301_HRC_Geneva_launch.jpg
  • 151208_Uwazi_Madrid_inception.pdf
  • 160219_OHCHR_Tunis_meeting.jpg

Below are some guidelines for creating your own file naming convention.

1. Consider how you want to sort and retrieve your files

How do you want to sort and retrieve your files? The answer to this question will help determine some of the essential components of your file naming convention. Keep in mind that file sorting reads from left to right.

  • Start off your filename with the most important parameter. This will allow you to organise files alphabetically or chronologically by that parameter without having to do any searching. For example, if your primary method of accessing a litigation case file is its number, then this should be the first element in your file naming convention: when you sort your documents in the file manager, you will see them order by case number first.
  • For dates, use YYYY-MM-DD (or YYYYMMDD, or YYMMDD, or YYMM). To ensure that files are sorted in proper chronological order, the most significant date and time components should appear first followed by the least significant components. If all the other words in the file name are the same, this convention will allow us to sort by year, then month, then date. Some conventions have the date at the front of every file name because that is the most logical way for their team to retrieve files.
  • Mark different versions of the same file. If the file will be maintained over time, use the convention v1, v2, v3, etc. to depict its place in the sequence of versions. You may want to separate the “v” from the content type with an underscore (“_”) or a hyphen (“-”). As versions are made and updated, change the version but keep the file name the same.
  • Don’t forget the zeroes if you want sequential numbers. If there are going to be more than nine files with a name that’s basically the same (such as in the case of versioning or in a series of photos), make sure that you style the numbers like so: 01, 02, 03, … This will allow them to be sorted in chronological order. Same if it is more than 99 files, it should be 001, …060, …099, …100

2. Use relevant components in your file names to provide description and context

The file names should contain the essential elements of each file, dependent upon what is suitable for your retrieval needs. File names should outlast the person who originally named the file, so think about what information would be helpful to someone in 15 years. Potential components for human rights organisations include:

  • Name of organisation
  • Program or theme
  • Type of document
  • Geographic scope
  • Date or period
  • Language of document
  • Content type, such as “invoice” or “report”

Keep in mind you will most likely want to use agreed-upon abbreviations for these components in order to keep the file names short.

3. Keep the file name a reasonable length

Long file names do not work well with some types of software, so it’s best to keep them short. To achieve this, you could consider:

  • Shortening the year to two numbers instead of four
  • Abbreviating file name components (e.g. use “inv” instead of “invoice”, or “fr” instead of “francais”)
  • Using as few words as possible to convey the identity of the document

4. Avoid special characters and spaces

Special characters such as  ~ ! @ # $ % ^ & * ( ) ` ; < > ? , [ ] { } ‘ ” | should be avoided. Spaces are problematic too because some software will not recognize file names with spaces. Use these alternatives instead:

  • Underscores (e.g. file_name.xxx)
  • Dashes (e.g. file-name.xxx)
  • No separation (e.g. filename.xxx)
  • Camel case, where the first letter of each section of text is capitalized (e.g. FileName.xxx)

5. Document your file naming convention and get others onboard

It’s important to write down the rules of your file naming convention to stay consistent. If people other than yourself are naming files, then it’s doubly important to document the convention and store it in a place that’s easy to find. You might want to include this documentation in a readme.txt file in the main shared folder.

Here are two examples of documented file naming conventions from our partners: one from the African Commission on Human and Peoples’ Rights (ACHPR), and the other from the International Commission of Jurists (ICJ).

Beyond text files, you might also consider holding a brief internal training session to explain why the new file naming convention is so important to use and how it works, or creating a video that goes through the key points of the convention.

Further resources

Stanford University Libraries offers two illustrative case studies for continued learning on file naming conventions:

  • Example 1 explains a file naming convention gone wrong. This example highlights the importance of: consistent file naming, using descriptive components, and including a readme.txt file to explain the project and the file naming convention.
  • Example 2 describes the organised and thorough method they used to name the thousands of image files of tiles collected from the ocean floor. It’s an interesting example because the file names themselves provided the key data of each image. Researchers were able to easily search and sort based on the file naming convention.