Overview
8.3 filenames have at most eight characters, optionally followed by a period "." and a filename extension of at most three characters. For files with no extension, the "." if present has no significance (that is "myfile" and "myfile." are equivalent). File and directory names are uppercase, although systems that use the 8.3 standard are usually case-insensitive.
VFAT, a variant of FAT with an extended directory format, was introduced in Windows 95 and Windows NT 3.5. It allowed mixed-case Unicode long filenames (LFNs) in addition to classic 8.3 names.
To maintain backward-compatibility with legacy applications (on DOS and Windows 3.1), an 8.3 filename is automatically generated for every LFN, through which the file can still be renamed, deleted or opened. The 8.3 filename can be obtained using the Kernel32.dll function GetShortPathName.
Although there is no compulsory algorithm for creating the 8.3 name from an LFN, Windows uses the following convention:
- If the LFN is 8.3 uppercase, no LFN will be stored on disk at all.
- Example: "TEXTFILE.TXT"
- If the LFN is 8.3 mixed case, the LFN will store the mixed-case name, while the 8.3 name will be an uppercased version of it.
- Example: "TextFile.Txt" becomes "TEXTFILE.TXT".
- If the filename contains characters not allowed in an 8.3 name (including space which was disallowed by convention though not by the APIs) or either part is too long, the name is stripped of invalid characters such as spaces and extra periods. Other characters such as "+" are changed to the underscore "_", and uppercased. The stripped name is then truncated to the first 6 letters of its basename, followed by a tilde, followed by a single digit, followed by a period ".", followed by the first 3 characters of the extension.
- Example: "TextFile1.Mine.txt" becomes "TEXTFI~1.TXT" (or "TEXTFI~2.TXT", should "TEXTFI~1.TXT" already exist). "ver +1.2.text" becomes "VER_12~1.TEX".
- Beginning with Windows 2000, if at least 4 files or folders already exist with the same initial 6 characters in their short names, the stripped LFN is instead truncated to the first 2 letters of the basename (or 1 if the basename has only 1 letter), followed by 4 hexadecimal digits derived from an undocumented hash of the filename, followed by a tilde, followed by a single digit, followed by a period ".", followed by the first 3 characters of the extension.
- Example: "TextFile.Mine.txt" becomes "TE021F~1.TXT".
NTFS, a file system used by the Windows NT family, supports LFNs natively, but 8.3 names are still available for legacy applications. This can be optionally disabled to increase performance in situations where large numbers of similarly named files exist in the same folder.
The ISO 9660 file system (mainly used on compact discs) has similar limitations at the most basic Level 1, with the additional restriction that directory names cannot contain extensions and that some characters (notably hyphens) are not allowed in filenames. Level 2 allows filenames of up to 31 characters, more compatible with Mac OS filenames.
During the Microsoft antitrust trials, the names MICROS~1 and MICROS~2 were humorously used to refer to the companies that might exist after a proposed split of Microsoft.
Read more about this topic: 8.3 Filename