Re: Pet names, true names, and nicknames Jerome Vouillon (vouillon@saul.cis.upenn.edu)
Thu, 13 Apr 2000 13:49:14 -0400

On Thu, Apr 13, 2000 at 09:26:00AM +0200, Kai Henningsen wrote:
> Not that I remember. Some Windows archivers do this - mostly old 16bit
> software which still has to cope with 8+3. Under Win32, you can certainly
> have internal periods. (I think trailing periods and blanks may still be
> strange.) Forbidden chars are stuff like : \ / * (yes, you can use / in
> filenames just like \, it's just shells and command line parsers that get
> in trouble, the OS did this right ever since DOS 2.0). I think 8.3 has a
> lot more forbidden characters, but fortunately these days you usually
> don't have to care. If I remember, I'll look for a definitive list at
> work.

Here are the full rules, as given by Microsoft.

General rules for applications creating names for directories and files or processing names supplied by the user include the following:

Use any character in the current code page for a name, but do not use a path separator, a character in the range 0 through 31, or any character explicitly disallowed by the file system. A name can contain characters in the extended character set (128-255).

Use the backslash (\), the forward slash (/), or both to separate components in a path. No other character is acceptable as a path separator. Note that UNC names must adhere to the following format: \\server\share.

Use a period (.) as a directory component in a path to represent the current directory.

Use two consecutive periods (..) as a directory component in a path to represent the parent of the current directory.

Use a period (.) to separate the base file name from the extension in a directory name or file name.

Do not use the following characters in directory names or file names, because they are reserved:

< > : " / \ |

Do not use device names, such as aux, con, lpt1, and prn, as file names or directory names.

Process a path as a null-terminated string. The maximum length for a path, including a trailing backslash, is given by MAX_PATH.

The Unicode versions of several functions permit paths that exceed the MAX_PATH length if the path has the "\\?\" prefix. The "\\?\" tells the function to turn off path parsing. However, each component in the path cannot be more than MAX_PATH characters long. Use the "\\?\" prefix with paths for local storage devices and the "\\?\UNC\" prefix with paths having the Universal Naming Convention (UNC) format. The "\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\bill_g_1\hotstuff\coolapps".

Do not assume case sensitivity. Consider names such as OSCAR, Oscar, and oscar to be the same.