Naming computer files in most ways is the same as naming any other file, except for a few conventions you need to think about.
Using Special Characters
Generally, when naming computer files in Windows, you cannot use the following characters:
- < (less than)
- > (greater than)
- : (colon)
- ” (double quote)
- / (forward slash)
- \ (backslash)
- | (vertical bar or pipe)
- ? (question mark)
- * (asterisk)
However, there are other characters which are allowed under Windows that you should avoid.
- Period or dot (.) should only be used before the file name extension (i.e. .doc, .ppt, .mdb, .txt, etc.). While you can throw a dot in anywhere, it can be confusing to others looking at the file name. Convention holds that it is used only to separate the file name from the file type extension.
- Spaces can be used between words, but I recommend against it. The reason being that if you need to post a document on-line or upload it to a SharePoint library, those spaces are going to be replaced with the html code for a space, making the link hard to remember. Either use no spaces or replace spaces with underscores (_).
- Other special characters should be avoided for the same reason that you may want to upload that document to a website at some point, and internet addresses cannot contain most special characters. So, unless you want to have to rename every file containing #, @, %, & or other special characters in the name before you upload it to your SharePoint document library, just don’t use them to start with. I had to rename over 200 documents one day because they all contained a # sign in the name.
Your best bet is to just not use anything but alphanumeric characters plus the dash and underscore keys when naming files.
Windows allows file names to have up to 255 characters, which sounds like a huge amount, until you realize that the name of each file includes the name of every directory it is buried in. So, if you have a file buried under 5 directories, each with a long name, you can easily exceed the 255 character limit. If you move a file with a really long name into a directory many levels deep, all with long names, you’ll suddenly get an error when you try to open the file, because the file name is now more than 255 characters in length. When I did help desk work for a local refinery, I got at least one call from this problem a week, because everyone used very descriptive directory and file names, and would build these extremely deep file structures. The lesson here is to think about the length of all file and directory names when you are creating your filing system and naming files.
Dates in File Names
Putting dates in file names requires some special rules if you want your files listed in date order within your directory. Here’s some basic rules to follow:
- Always use a 4 digit year and put the year first in the date. Otherwise, your files will be listed by month (or day if you use European dating conventions) with all years mixed together.
- Don’t spell out month names (January, February, etc.) since this will put April ahead of March and December ahead of October and November.
- Always use 2 digit month and day. If you don’t, you’ll see November (10) and December (12) listed before February or March (2 and 3). The reason for this is that Windows filing system does not recognize dates. It lists files strictly in alphanumeric order. So any file starting with 1 will proceed any file starting with 2. The way around this is to list 2 as 02 and 3 as 03.
- All dates should be in the form of yyyy-mm-dd i.e. 2010-02-20). I know Europeans like the day then month format, but your electronic files won’t file properly if you put the day first.
While your only consideration in naming paper files is clarifying what the file contains, when you name electronic files, you have many other conventions to consider.