Naming Files in Windows
According to Ed Bott and Woody Leonhard the following are the requirements
for Windows filenames:
- A filename may contain any alphanumeric character, including
the letters A to Z and numbers from 0 to 9.
- The full filename (including drive letter, colon, backslashes, and folder
names) may be as long as 255 characters.
- The filename itself may be as short as one character.
- The following special characters are allowed in a filename:
$ % - _ @ ~ ` ' ! ( ) ^ # & + , ; = . [ ] { }
- Spaces are allowed in filenames.
- The following special characters are prohibited from being a part
of a filename because they have special meanings to the operating system
(DOS legacy for Windows):
/ \ | : * ? " < >
You'll get an error message if you try to use one of them.
- Windows files (and Office files in particular) typically include an extension, which is added automatically by the program
that created the file (such as .docx for files created by Word). However, an extension
is not required by Windows, nor are extensions limited to four characters. Windows
treats any characters following the last period in the filename as an
extension.
Source: Special Edition Using Office 2000
by Ed Bott and Woody Leonhard., pp. 73-74 Que. (paraphrased slightly)
Although the above are requirements, here are some recommendations or
notes:
- They recommend limiting the name of the file itself to about 40 characters
so that you don't have trouble moving files with deeply nested folders. I
recommend keeping folder names short.
- If you use a nonstandard extension you may have difficulty opening the
file from Windows. In Microsoft Office programs files with nonstandard
extensions will not appear in file dialog boxes unless you change the file
type to All Files.
- Windows filenames are not case sensitive. MyFile.doc is treated the same
as MYFILE.DOC and myfile.doc. However, if you are publishing to a web page,
the web server may be using a different operating system that does pay
attention to case.
- Word marks temporary files with a beginning tilde (~) character. Do not this as the beginning character for any file that will
be used by any of the MS Office programs. I would recommend not using it at
all as the start of a filename.
- If an application uses customary extensions (Word: docx, docm, dotx,
dotm, doc, dot), I recommend not using those for your custom files. I
recommend letting the application assign the extension.
- I often affix dates to file names, either at the beginning or
end.
When I do, I do it in numerical format starting with the year. YYYY-MM-DD,
ie., 12-17-2020 for December 17, 2020.
This makes it easy to sort files with similar names by date.
- You can use the allowed symbols as abbreviations. For instance I use @
to mean Letter or correspondence. (I started doing this in DOS when
filenames were limited to eight characters plus a three-character
extension.)
|