Show Hidden System Files with DIR in MS-DOS 6.22

In MS-DOS 6.22, the standard DIR command hides files marked with system or hidden attributes by default to prevent accidental modification or deletion. To view these protected files, you must use the DIR command combined with the /A (attribute) switch. This guide explains the exact command syntax needed to list hidden system files, display all files regardless of attributes, and combine display options for easier navigation.

The Attribute Switch Syntax

The /A switch controls which files are displayed based on their file attributes: Archive (A), Read-only (R), Hidden (H), and System (S).

To display files that have both the Hidden and System attributes set, open the MS-DOS prompt, navigate to the target directory, and enter:

DIR /A:HS

You can also omit the colon:

DIR /AHS

Useful Variations for Viewing Hidden and System Files

Depending on what you need to see, MS-DOS 6.22 supports several variations of the /A switch:

  • Show all hidden files: To view all hidden files (regardless of whether they have the system attribute):
    DIR /A:H
  • Show all system files: To view all system files (regardless of whether they are hidden):
    DIR /A:S
  • Show everything: To display every file in the directory, including normal, hidden, read-only, and system files:
    DIR /A

Combining with Display Modifiers

Because directories containing system files often contain extensive file lists, you can combine the attribute switch with other DIR parameters:

  • Pause per screen: Add /P to pause the output after every full screen of information:
    DIR /A:HS /P
  • Wide listing: Add /W to display the files horizontally across columns, saving vertical screen space:
    DIR /A:HS /W
  • Include subdirectories: Add /S to search and display hidden system files in the current directory and all of its subdirectories:
    DIR /A:HS /S