Directory Path Limits in Windows 98

This article provides an overview of the file system and directory path limitations inherent to Microsoft Windows 98. Operating primarily on the FAT16 and FAT32 file systems, Windows 98 enforced strict rules regarding maximum path lengths, individual filename lengths, directory nesting, and the total number of files permitted per directory.

Maximum Path Length (MAX_PATH)

In Windows 98, the primary restriction on directory paths was the Win32 API limit known as MAX_PATH.

  • Total Path Limit: 260 characters.
  • Effective Path Length: 256 characters.

The 260-character limit includes the drive letter, a colon, a backslash (e.g., C:\), the complete path of subdirectories, the file name, and an invisible terminating null character (\0). Because the drive specification uses 3 characters (C:\) and the null character requires 1, the maximum usable length for the actual directory path and filename combined is 256 characters.

Filename Length Limits

Windows 98 utilized the Virtual File Allocation Table (VFAT) architecture, which supported Long File Names (LFN) alongside traditional MS-DOS short names:

  • Long File Names (LFN): A single file or folder name could be up to 255 characters long, including the file extension.
  • Short File Names (8.3 format): For backward compatibility with 16-bit DOS applications, the system automatically generated an 8-character name with a 3-character extension for every long filename.

Directory Depth

Windows 98 did not define a fixed numerical limit on how deeply folders could be nested. Instead, nesting was governed entirely by the MAX_PATH constraint. You could create as many nested subdirectories as desired, provided the fully qualified path did not exceed 260 characters.

Directory Entry Limits (FAT16 vs. FAT32)

Windows 98 supported both the FAT16 and FAT32 file systems, each imposing distinct limits on directory structures:

FAT16

  • Root Directory Limit: The root directory (C:\) was restricted to a fixed maximum of 512 entries. Long filenames consumed multiple entries (one entry for the 8.3 alias plus one entry for every 13 characters of the long name), meaning the practical limit of files in the root folder could be significantly lower than 512.
  • Subdirectory Limit: Subdirectories were not restricted to 512 entries and could grow dynamically up to 65,534 entries, subject to available disk space and path limits.

FAT32

  • Root Directory Limit: The root directory was treated as a standard cluster chain, removing the 512-entry limitation and allowing it to expand dynamically like any subdirectory.
  • Folder Entry Limit: Any folder (root or subdirectory) could hold a theoretical maximum of 65,534 directory entries. Because of LFN entry consumption, storing files with long names reduced the actual number of files a single folder could hold.