Long Filename Support in Windows 95

For every long filename, an alias entry is generated automatically that complies with the 8.3 filename rules for backward compatibility. Automatically generated aliases are composed of the first six characters of the filename plus ~n (where n is a number) and the first three characters after the last period. So the filename ThisIsALong.File.Name is associated with the automatically generated alias THISIS~1.NAM. If the alias name already exists, the algorithm increments n, where n begins with 2 until the system can find a unique filename.

Note

Neither the user nor an application can control the name created by the automatic alias process. Related issues are discussed in "Long Filenames and Network Compatibility" later in this chapter.

For the filename to comply with the 8.3 filename rules, it must use only the valid characters for an alias and it must be all uppercase. Short filenames are converted to uppercase by the IFSMGR before being passed to the file system driver. Valid characters for 8.3 filenames (and aliases) can be any combination of letters and numbers, a blank (ASCII 20H), ASCII characters greater than 127, and the following special characters:


$ % ' - _ @  ~ ` ! ( ) ^ # &

The following additional characters are valid in long filenames, but are not valid in alias names or 8.3 filenames:


+ , ; = [ ]

The following rules also apply for Windows 95 file systems:

The filename and the alias are the same if the filename meets 8.3-filename rules (that is, if it contains only valid characters for an alias and it is all uppercase). This means that a filename using only valid characters for an alias and following the 8.3-filename format is still not the same as the alias name if it contains lowercase characters. However, in this case the alias is the uppercase version of the filename. For example, if the long filename is Examples.Txt, its alias is EXAMPLES.TXT. The case is preserved in the long filename. (Notice, though, that searches in the Windows 95 file system are not case-sensitive. So a search of the form "examples.txt" or "Examples.Txt" will find the same files.)

Tip

To see the alias for a file, right-click the file in any shell program such as Windows Explorer and then select Properties from the context menu. The value for MS-DOS Name in the General properties dialog box shows the alias assigned to this file. Also, the dir command at the command prompt shows the long filename.