MS-DOS 6.22 File Attributes Explained

In MS-DOS 6.22, file attributes are specific metadata flags stored within the FAT filesystem's directory entries that dictate how the operating system and applications interact with files. The four primary attributes—Read-Only, Archive, Hidden, and System—play crucial roles in file security, backup automation, system stability, and interface clutter control. Managing these flags allows users and system administrators to protect critical operating system components and streamline file management tasks using native utilities like the ATTRIB command.

The Role of the ATTRIB Command

In MS-DOS 6.22, attributes are manipulated primarily through the internal command ATTRIB.EXE. The syntax uses plus (+) to enable an attribute and minus (-) to disable it, followed by the attribute letter (R, A, S, or H). Running ATTRIB without parameters displays the current flags assigned to the files in the directory.

Read-Only (R)

The Read-Only attribute protects files from accidental modification or deletion.

  • Behavior: When the Read-Only flag is active, standard DOS commands such as DEL or ERASE will refuse to delete the file, returning an "Access denied" error. Furthermore, applications attempting to open the file with write permissions will fail or be forced to open it in a read-only mode.
  • Significance: It serves as a software-level lock against human error and rogue scripts. While it does not provide true multi-user security, it prevents accidental loss of critical configuration files, templates, and read-heavy documents.

Archive (A)

The Archive attribute is a tracking flag designed specifically for backup management.

  • Behavior: MS-DOS automatically sets the Archive bit to "on" whenever a file is created or modified. Backup utilities, including the native MSBACKUP and advanced XCOPY commands (using flags like /M or /A), inspect this bit to determine if a file has changed since the last backup operation. Once backed up, the utility clears the Archive bit.
  • Significance: The Archive flag is the foundation for differential and incremental backup strategies in MS-DOS. It eliminates the need to scan file contents or compare timestamps across entire storage disks to identify newly modified data.

Hidden (H)

The Hidden attribute controls file visibility in standard environment operations.

  • Behavior: Files flagged as Hidden are omitted from normal directory listings generated by the DIR command. They are also shielded from wildcards in bulk commands (for example, DEL *.* will not delete hidden files). Users must use specific parameters, such as DIR /AH, to display them.
  • Significance: The primary purpose of the Hidden flag is to prevent interface clutter and reduce accidental user tampering. Utility files, internal program caches, and system configurations often use this flag so that casual command-line navigation remains focused only on primary user data.

System (S)

The System attribute designates a file as an essential component of the operating system itself.

  • Behavior: Like hidden files, System files are excluded from standard DIR listings and wildcard deletions. In MS-DOS 6.22, the System flag carries a higher operational significance than the Hidden flag. Changing or stripping the System attribute often requires explicitly targeting the file with ATTRIB -S, and certain DOS utilities apply stricter safeguards against moving or altering these files.
  • Significance: This attribute is reserved for files that the DOS kernel relies on to function, such as IO.SYS and MSDOS.SYS. Marking these core files with the System attribute ensures that standard maintenance operations do not compromise the bootability or stability of the operating system.