Basic Naming Conventions
The following fundamental rules enable applications to create and process valid names for files and directories, regardless
of the file system:
- Use a period to separate the base file name from the extension in the name of a directory or file.
- Use a backslash (\) to separate the components of a path.
The backslash divides the file name from the path to it, and one
directory name from another directory name in a path. For additional
details about what a path is, see the Path Names and Namespaces section
below.
- Use a backslash as required as part of volume names,
for example, the "C:\" in "C:\path\file" or the "\\server\share" in
"\\server\share\path\file" for Universal Naming Convention (UNC) names.
You cannot use a backslash in the actual file or directory name
components because it separates the names into components.
- Use almost any character in the current code page for a name,
including Unicode characters and characters in the extended character
set (128–255), except for the following:
- The
following reserved characters are not allowed:
< > : " / \ | ? *
- Characters whose integer representations are in
the range from zero through 31 are not allowed.
- Any other character that the target file system does not allow.
- Use a period as a directory component in a path to represent the current directory, for example ".\tmp.txt".
- Use two consecutive periods (..) as a directory component in a path to represent the parent of the current
directory, for example "..\tmp.txt".
- Do not use the following reserved device names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2,
COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
Also avoid
these names followed immediately by an extension; for example, NUL.txt is not recommended.
- Do not assume case sensitivity. For example, consider the names
OSCAR, Oscar, and oscar to be the same, even though some file systems
(such as a POSIX-compliant file system) may consider them as different.
Note that NTFS supports POSIX semantics for case sensitivity but this
is not the default behavior. For additional information, see CreateFile.
- Do not end a file or directory name with a trailing space or a period. Although the underlying file
system may support such names, the operating system does not. However, it is acceptable to start a name with a period.
[출처 : http://msdn.microsoft.com/en-us/library/aa365247.aspx]
|