Show System and Hidden Files in MS-DOS 6.22

In MS-DOS 6.22, the standard DIR command hides files flagged with the Hidden or System attributes to protect critical operating system data from accidental modification or deletion. To reveal these files in a directory listing, you must use the /A (Attribute) switch alongside specific attribute flags. This guide explains the exact syntax required to view hidden, system, or combined system-hidden files.

The Basic Syntax

The /A switch controls which files are displayed based on their attributes. The syntax is:

DIR [drive:][path][filename] /A[:]attributes

The colon : after /A is optional.

Displaying All Files (Including System and Hidden)

To view every file in the current directory regardless of its attributes, execute:

DIR /A

Using /A without any following letters instructs MS-DOS to bypass all attribute filters, listing standard files, directories, hidden files, and system files together (such as IO.SYS and MSDOS.SYS).

Displaying Only Hidden Files

To list only the files marked with the Hidden attribute:

DIR /A:H

Displaying Only System Files

To list only the files marked with the System attribute:

DIR /A:S

Displaying Files That Are Both Hidden and System

Certain core operating system files possess both the System and Hidden attributes simultaneously. To filter for files that have both flags set, combine the attribute letters:

DIR /A:SH

(Note: DIR /A:HS works identically.)

Useful Modifier Switches

Because system and hidden file lists can be extensive, you can combine attribute switches with other standard DIR parameters:

  • Pause per screen: Add /P to view results one page at a time.
    DIR /A:SH /P
  • Wide format: Add /W to display results across five columns.
    DIR /A:SH /W
  • Include subdirectories: Add /S to search for system and hidden files across the current directory and all subfolders.
    DIR C:\ /A:SH /S