Naming files and directories

There are two general rules for file organization:

  • Be consistent.
  • Be descriptive.

Time spent at the beginning of the project defining folder hierarchy and file naming conventions make it easier to keep files organized and findable.

Remember that no matter how well organized a storage and retrieval system is designed to be, ongoing training and communication with end-users is necessary. While files are created in a variety of formats and contain diverse sets of information, all files share a set of universal characteristics.

  • Files will need to be accessible.
  • Files will be shared and moved from their original location.
  • Files have a retention period.
  • Files will have multiple versions.

Rules of thumb

Avoid using special characters in a file name. \ / : * ? “ < > | [ ] & $ , .

The characters listed above are frequently used for specific tasks in a digital environment. For example:

  • A forward slash is used to identify folder levels in Microsoft products, while Mac operating systems use the colon.
  • Periods are used in front of file-name extensions to denote file formats such as .jpg and .doc; using them in a file name could result in lost files or errors.

Use underscores instead of periods or spaces.

Similarly, spaces are frequently translated in a Web environment to be read as “%20”. For example, file name.doc would appear as file%20name.doc. Some programming languages use spaces to signify the end of a character string, and many software applications don’t recognize file names that contain spaces.

Err on the side of brevity.

The length of the file name can play an important role when performing system migrations and file uploads. Depending on the operating system and software in use, file names can contain as many as 256 characters. Others allow far fewer. Generally, 25 characters is a sufficient length to capture enough descriptive information for naming a file.

The file name should include all necessary descriptive information independent of where it is stored.

Files are frequently copied to other folders, downloaded, and emailed. It is important to ensure that the file name, independent of the folder where the original file lives, is sufficiently descriptive. For example:

  • World_War_I\Posters\Owens\0001.tif
  • World_War_I\Posters\RedCross\0001.tif

In the above example, these are two different photographs. One is associated with the folder Owens and one with the folder Red Cross. However, the file names are the same. If the two files were pulled out of their respective folders, the contextual information would be lost. A more accurate file name would be:

  • World_War_I\Posters\Owens\ wwI_poster_owens_0001.tif
  • World_War_I\Posters\RedCross\ wwI_redcross_owens_0001.tif

Add dates and format them consistently.

A benefit of organizing digital records is to enable accessibility not only by current users but by future users as well. The best way to list the date is based on an international standard – ISO 8601. ISO 8601 specifies numeric representations of date and time to be used in electronic format. The international standard date notation is YYYYMMDD.

  • YYYY is the year
  • MM is the month of the year between 01 (January) and 12 (December)
  • DD is the day of the month between 01 and 31

This format allows ease of sorting and comparing files by date and prevents confusion with other date formats (especially in other formats that use just two digits for the year). For example, this webpage could be named 20190101_FilenamingConventions to reflect that this page was last edited on January 1, 2019.

Some people find it more useful to have the date at the start of the file name, while others might prefer it at the end. Either way, when used consistently, it is a useful sorting tool when the files are organized.

Dates are also useful when the files in question are being retained due to applicable retention policies and laws. Having the date in the file name makes it much easier to select the file, evaluate it for its ongoing value, and make the decision to delete or preserve it.

Include a version number on these documents to more easily manage drafts and revisions

The easiest way to do this is to use the letter “v” to represent “version number.” Then, “v01, v02, v03” can be added as needed to a file and the main file name can stay the same. This is much more effective than other common additions like “update,” “new,” “old,” etc. An exception to this rule is using “FINAL” to indicate the final version of the document. This can be helpful to quickly identify the most accurate version of the document. When using “FINAL”, be sure to use it instead of the version number, rather than in addition to it.


updated 2019-01-04