How to Show Hidden Files in MS-DOS 6.22

In MS-DOS 6.22, files assigned the hidden attribute do not appear in standard directory queries. To view these files and their attributes in directory listings, MS-DOS provides specific switches for the DIR command, as well as the ATTRIB utility. This guide explains the exact command syntax needed to reveal hidden files and inspect their attribute statuses directly from the command prompt.

Using the DIR Command with the /A Switch

The standard DIR command hides any file marked with the hidden (H) attribute. To override this behavior, use the /A (Attribute) switch.

  • List only hidden files:

    DIR /A:H

    (You can also omit the colon: DIR /AH)

  • List all files, including hidden and system files:

    DIR /A
  • List hidden files across subdirectories:

    DIR /A:H /S

Viewing File Attribute Flags with ATTRIB

While the DIR command displays file names, sizes, and timestamps, it does not display the attribute letters (H for hidden, S for system, R for read-only, A for archive). To view the explicit attribute flags assigned to files in a directory, use the ATTRIB command.

  • Display attributes for all files (including hidden):
    ATTRIB *.*

Files with the hidden attribute will display a capital H on the left side of the directory list.

Modifying the Hidden Attribute

If you need to unhide a file so it appears in standard DIR listings without using switches, remove the hidden attribute using a minus sign:

ATTRIB -H filename.ext

If the file also carries the system (S) attribute, both must be cleared simultaneously:

ATTRIB -H -S filename.ext