Microsoft Corporation Staff, IT Professional Staff - Microsoft Windows 2000 Server Operations Guide
File names on Windows NT and Windows 2000 platforms can be up to 255 characters, and can contain spaces, multiple periods, and special characters that are forbidden in
By creating 8.3 file names for files, Windows 2000 also enables
If the long name of a file or folder contains spaces, you must surround the name with quotation marks. For example, if you have a program called Dump Disk Files that you want to run from the command line and you enter the name without quotation marks, it generates the error message "Cannot find the program Dump or one of its components."
You must also use quotation marks when a path typed at the command line includes spaces, as in the following example:
move "c:\This month's reports\*.*" "c:\Last month's reports"
Use wildcard characters such as the asterisk (*) and question mark (?) carefully in conjunction with the del and copy command-line commands. Windows 2000 searches both long and short file names for matches to the wildcard character combination you specify, which can cause additional files to be deleted or copied.
Both FAT and NTFS use the Unicode character set for their names, which contain several forbidden characters that
Note
You can permit extended characters by setting the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem \NtfsAllowExtendedCharacterIn8dot3Name to 1.
When there are five or more files that would result in duplicate short file names, Windows 2000 uses a slightly different method for creating short file names. For the fifth and subsequent files, Windows 2000:
- Uses only the first two letters of the long file name.
- Generates the next four letters of the short file name by mathematically manipulating the remaining letters of the long file name.
- Appends ~1 (or another number, if necessary, to avoid a duplicate file name) to the result.
This method provides substantially improved performance when Windows 2000 must create short file names for a large number of files with similar long file names. Windows 2000 uses this method to create short file names for both FAT and NTFS files.
Table 3.7 shows the short file names for files that were created in the order test 1 through test 6.
Table 3.7 Short File Names Created by Windows 2000 – Example One
Long File Name | Short File Name |
---|---|
This is test 1.txt | THISIS~1.TXT |
This is test 2.txt | THISIS~2.TXT |
This is test 3.txt | THISIS~3.TXT |
This is test 4.txt | THISIS~4.TXT |
This is test 5.txt | TH0FF9~1.TXT |
This is test 6.txt | THFEF5~1.TXT |
If the long file names in Table 3.7 are created in a different order, their short file names are different, as shown in Table 3.8.
Table 3.8 Short File Names Created by Windows 2000 – Example Two
Long File Name | Short File Name |
---|---|
This is test 2.txt | THISIS~1.TXT |
This is test 3.txt | THISIS~2.TXT |
This is test 1.txt | THISIS~3.TXT |
This is test 4.txt | THISIS~4.TXT |
This is test 5.txt | TH0FF9~1.TXT |
This is test 6.txt | THFEF5~1.TXT |
To see both the long and short file names for each file in the folder, type the following on the command line:
dir /x
© 1985-2000 Microsoft Corporation. All rights reserved.