Display a list of files and subdirectories in a directory (folder).
filename] [/b] [/c] [/d] [/l] [/n] [/p] [/q] [/s] [/w] [/x]
Without any options,
dir displays the
disk’s volume label and serial number, a list of all
files and subdirectories (except hidden and system files) in the
current directory, file/directory size, date/time of last
modification, the long filename, the total number of files listed,
their cumulative size, and the free space (in bytes) remaining on the
If you specify one or more file or directory names (optionally including drive and path, or the full UNC path to a shared directory), information for only those files or directories will be listed.
Wildcards (* and ?) can be used to display a subset listing of files and subdirectories.
dir accepts the following options:
Display only files with/without specified attributes (using - as a prefix specifies “not,” and a colon between the option and attribute is optional). See “Attrib” in Chapter 4 for more information on attributes.
Use bare format (no heading information or summary). Use with
/s to find a filename.
Display compression ratio of files on Dblspace or DrvSpace drives, assuming 16 sectors/cluster.
/w, except files are sorted vertically.
List files in a “new” Unix-like display, where filenames are shown on the right.
List files in sorted order ...