MS-DOS 6.22 8.3 Filename Length Limits

Under MS-DOS 6.22 and the FAT16 file system, file naming is strictly governed by the classic 8.3 convention. This article provides an overview of the technical limits imposed on filename length, extension size, absolute path restrictions, and character constraints present in the operating system.

Base Filename and Extension Limits

The 8.3 filename standard enforces distinct limits on the two main components of a file identifier:

  • Base Filename: Must contain at least 1 character and no more than 8 characters.
  • Period Separator: The dot (.) functions solely as a delimiter between the base name and the extension; it is not counted as part of the filename length itself. If no extension is specified, the dot is omitted entirely.
  • Extension: Optional, consisting of 0 to 3 characters.

The maximum possible length for an individual file identifier in a directory listing is 12 characters: 8 characters for the base name, 1 character for the dot separator, and 3 characters for the extension (for example, MYFILE01.TXT).

Total Path Length Limits

In addition to individual file name lengths, MS-DOS 6.22 restricts the entire path length.

  • The maximum path length, including directory names and separators, is limited to 64 characters for the path component (excluding the drive letter and leading backslash).
  • When including the drive designator (e.g., C:\) and the terminating null character, the total absolute path limit is typically 66 to 67 characters. Any attempt to access, create, or traverse a directory structure exceeding this depth results in a "Path too long" or file-not-found error.

Character Constraints and Case Handling

Filename lengths in MS-DOS 6.22 are also affected by how characters are processed:

  • Case Insensitivity: Filenames are entirely case-insensitive. MS-DOS 6.22 automatically converts all ASCII lowercase characters (a-z) to uppercase (A-Z) before storing them.
  • Spaces: Spaces are illegal within filenames. Entering a space causes the command interpreter to process the space as a command argument delimiter.
  • Allowed Characters: Alphanumeric characters (A–Z, 0–9) and a limited set of special characters: !, #, $, %, &, ', (, ), -, @, ^, _, `, {, }, and ~.
  • Prohibited Characters: The system reserves control characters (ASCII 0–31) and structural symbols: *, ?, <, >, :, ", /, \, |, =, +, ;, ,, and . (except as the single extension delimiter).

Reserved Device Names

Regardless of length or valid extensions, MS-DOS 6.22 reserves specific names for system devices. You cannot name a file using any of the following names, even if an extension is attached (e.g., CON.TXT or PRN.DAT are invalid):

  • CON (Console)
  • PRN (Printer)
  • AUX (Auxiliary device)
  • NUL (Null device)
  • COM1, COM2, COM3, COM4 (Serial ports)
  • LPT1, LPT2, LPT3 (Parallel ports)