8.3
|
8.3 is a common shorthand for the limits on filename length imposed by the FAT file system used by CP/M, DOS and version of Microsoft Windows prior to Windows 95. 8.3 filenames must have at most eight characters, followed by a ".", followed by a filename extension of at most three characters. File and directory names are uppercase.
VFAT, a variant of FAT with an extended directory format, was introduced in Windows 95 and Windows NT 3.5. It allowed much longer, mixed-case Unicode 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 it can still be renamed, deleted or opened.
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".
- The LFN is truncated to the first 6 letters of its basename, followed by a tilde, followed by a single digit, followed by the first 3 characters of the extension. The result is then stripped of invalid characters and uppercased.
- Example: "TextFile1.Mine.txt" becomes "TEXTFI~1.TXT" (or "TEXTFI~2.TXT", should "TEXTFI~1.TXT" already exist).
- If this still does not yield a unique name, the LFN is instead truncated to the first 2 letters of the basename (or 1 if the basename has only 1 letter), followed by 4 random hexadecimal digits, followed by a tilde, followed by a single digit, followed by the first 3 characters of the extension. The result, as before, is stripped and uppercased.
- Example: "TextFile.Mine.txt" becomes "TE021F~1.TXT".
The NTFS 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.
Although ISO 9660 file system (mainly used on compact discs) allows filenames of up to 31 characters, CD authoring software has traditionally imposed the same 8.3 namimg scheme to maintain compatiblity with Microsoft operating systems.