How to Name Files
Purpose & Rationale
To provide a model for the naming of files that can be consistently applied across an organisation in order to improve the accessibility of the information stored in the file system. The system descibed below is presented as an example, not as 'the perfect system'. If you read what is below and would like to suggest improvements, please submit them by email to owen@AT@minns.DOT.ca.
File names should allow everyone to understand the purpose and nature of a file no matter where you see it (e.g., as an email attachment, if it is in the wrong folder or if it is on your 'virtual desktop').
Naming files in a consistent pattern makes it easier to find documents: (i) 'sort on filename' in your file browser (e.g., Nautilus, Windows Explorer) groups similar documents close by; and (ii) when searching for documents using the search tool in your file browser, since filenames have enough useful information to be 'caught' by the search criteria.
The File Name Model
[Document Name] [for [Organisation][Name][Date]] [(from [source])] [(Report ID or other ID code)] [Generation Date of Document Contents][Revision Number].[Extension]
[Document Name], [Generation Date of Document Contents], and [Extension] are required minimum elements.
Good Examples
- Charitable Activity in 2003 for Communications 20040302.xls
This file contains information about charitable activity that happened in 2003, and the document was created for the Communications group on 2004-03-02. If I came across a similarly named file that was dated 20040301, I would immediately know which is the more current version, without needing to open the file and examine its contents. - Customer Segments in OLAP System (RPTACS1) 20040131.txt
This file describes or lists customer segment that our OLAP system contains; the report contents were generated on 2004-01-31, so I know how recent this is, and if I think it is too stale, I have the report ID handy to use when requesting a refresh. - Customer Accounts with Bad Codes (from ASingh) 20040215r1.doc
This file informs me about customer accounts that have bad codes, I received the document from someone with first initial A and last name Singh, that person generated the contents on 2004-02-15 and this is the first revised version from that day.
Bad Examples
- Results.doc
What results? When are they from? - Company Audit Team Introduction Presentation.ppt
Take out the word 'Presentation', add a generation date; the .ppt extension and the icon make that clear to the computer and to people.- Client Satisfaction Survey Results FINAL.doc, and Client Satisfaction Survey Results DONE.doc
Which is more up to date? Is one a revision of the other?- Customer Segments in OLAP System 20040131.txt
If we happen to recognise this as the name of a report produced from our OLAP system, and we want to download a new copy, it would be helpful to have the Report ID handy (cf. good example, above).Notes
- File extensions should be accurate (i.e., do not label a plain text file x.doc, name it x.txt). This is helpful since it makes clear to your operating system (e.g., Linux, Windows) and to people which program to use and what to expect when the file is opened.
- Do not use file names that only make sense in particular directories; a bad example would be the file "Totals.xls" in the folder \Audit Team\Financials\2003 this should probably be named "Audit Team Financial Totals for 2003 20040215.xls" or something like that, so that if the file is moved out of its 'home' directory, its name is still helpful in determining what the file is.
- Words such as report, list, table and extract are usually unnecessary in file names and should be omitted; exceptions might be where these indications are key to the difference between two otherwise very similar files.
- When multiple identifiers are used, e.g., organisation and name, put the larger entity first, i.e., organisation, then group then subgroup.
- The conjunction and may be omitted within groups of similar identifiers.
- Similar identifiers at the same level should be listed in standard English alphabetic order.
- Naturally, dates must always be specified in an ISO 8601 standard format, i.e., YYYYMMDD (or YYYY-MM-DD if you are confused by the former). See this document for more information about standard ISO 8601 format.
- Use file names no longer than 63 characters, including the extension and the period that separates the name from the extension. This ensures that your filenames need no amendment before being burned to an ISO 9660 compliant CD.
- If you use abbreviations (e.g., Stmt for Statementing), then always use the same abbreviation for the same purpose.
- Some environments make it impractical to work with file name that contain spaces; in such cases, you can simply remove all spaces from the file names, or replace all spaces with hypens or underscores, e.g., Charitable-Activity-in-2003-for-Communications-20040302.xls.
How to Use Directories
Do not make a directory for fewer than six files. I.e., if you have five files that are your 2002 results, and two files for the 2003 results, these can all be placed in a '/Results' folder; it is a waste of time to navigate from "/Results/2002" to "Results/2003" and there is not much benefit, since there are so few files that the original folder anyhow.
Unless the file names are rigorously organised, you should probably consider using subfolders when you get 60 or more files in a directory.
--> - Company Audit Team Introduction Presentation.ppt
