How Windows 98 Handled File Attributes

Microsoft Windows 98 managed file attributes by combining the traditional MS-DOS FAT file system structure with the graphical Windows Explorer interface. While relying on single-byte directory flags to determine file states such as Read-Only, Hidden, System, and Archive, the operating system introduced more user-friendly visual controls, distinct behavioral rules for folders, and safeguards to prevent users from accidentally damaging critical system files.

The FAT Directory Structure

Under the hood, Windows 98 predominantly ran on FAT16 and FAT32 file systems. Every file and directory entry on a FAT volume reserved a specific 8-bit attribute byte that tracked the file’s properties:

  • Read-Only (0x01): Marked the file as protected against write and delete operations.
  • Hidden (0x02): Flagged the file to be excluded from standard directory listings.
  • System (0x04): Designated files critical to the operating system, often combined with the Hidden attribute.
  • Archive (0x20): Indicated that a file had changed since the last backup.

Because Windows 98 maintained backward compatibility with real-mode MS-DOS 7.1, these bits remained identical to the standards established in earlier versions of DOS.

Handling the Read-Only Flag

When a file was marked as Read-Only, Windows 98 restricted software and users from modifying or overwriting it:

  • GUI Prompts: If a user attempted to delete a read-only file in Windows Explorer, the system interrupted the action with a confirmation dialog: "The file '[filename]' is a read-only file. Are you sure you want to move it to the Recycle Bin?"
  • Application Behavior: Standard Win32 and 16-bit applications opened read-only files in read-only mode. Applications like Notepad prevented users from directly saving changes back to the original file, requiring them to use "Save As" to create a new file.
  • Special Folder Behavior: In Windows 98, the Read-Only attribute on a folder was repurposed. Rather than making the directory immutable, Windows Explorer used the flag as a signal to look for a desktop.ini file inside the folder, enabling custom folder icons and shell web views.

Handling the Hidden Flag

The Hidden attribute suppressed items from standard views to prevent clutter and reduce the risk of accidental modification:

  • Explorer Visibility: By default, Windows 98 hid these files from view. Users could change this behavior via View > Folder Options > View tab in Windows Explorer by toggling between "Do not show hidden or system files" and "Show all files".
  • Visual Distinction: When set to display hidden files, Windows Explorer rendered their icons as semi-transparent (ghosted) graphics, making it easy to distinguish them from standard files.
  • Command Line Filtering: In the MS-DOS prompt, the standard dir command omitted hidden files unless executed with the /a:h or /a switch.

Methods of Modification

Windows 98 provided two primary methods for users and administrators to view and toggle these flags:

  1. Windows Explorer GUI: Right-clicking any file and selecting Properties displayed a dialog box with an Attributes section at the bottom. Users could check or uncheck the Read-only, Hidden, and Archive boxes. The System attribute was intentionally omitted from this GUI panel to deter unauthorized changes to essential boot and kernel files.
  2. The MS-DOS attrib Command: Advanced users used the command line utility attrib.exe to manage flags directly. This tool offered full control over all four primary flags:
    • attrib +r -h filename.txt (Adds Read-Only, removes Hidden)
    • attrib +s +h filename.sys (Applies both System and Hidden attributes)

Software APIs

For software developers, Windows 98 exposed these flags through both the Win32 API and legacy DOS interrupts. Developers could call GetFileAttributes() and SetFileAttributes() in C/C++ to inspect or alter flags programmatically. These functions mapped directly to the low-level INT 21h, Function 43h calls in MS-DOS, maintaining absolute parity between graphical Windows software and legacy DOS utilities.