dir
Without any options, dir
displays the
disk's volume label and serial number, a list of all
files and subdirectories in the current directory, file/directory
size, date/time of last modification, long filename, the total number
of files listed, their cumulative size, and the free space (in bytes)
remaining on the disk. If you specify one or more file or directory
names (*
and ?
wildcards are
supported), information only for those files or directories will be
listed. dir
accepts the following options:
dir [filename
] [/b] [/c] [/d] [/l] [/n] [/p] [/q] [/s] [/w] [/x] [/4] [/a:attributes
] [/o:sortorder
] [/t:timefield
]
Option |
Description |
---|---|
|
Display only files with/without specified attributes (using - as a prefix specifies "not," and a colon between the option and attribute is optional). |
|
Use bare format (no heading information or summary). Use with
|
|
Display compression ratio of files on Dblspace or DrvSpace drives, assuming 16 sectors per cluster. |
|
Same as |
|
Use lowercase. |
|
List files in a "new" Unix-like display, where filenames are shown on the right. |
|
List files in sorted order (using - as a prefix reverses the order, and a colon between the option and attribute is optional): d = date and time (earliest first), e = alphabetically by extension, g = group directories first , n = alphabetically by name, s = size (smallest first). |
|
Pause after each screenful of information; press any key to continue. |
|
Display the owner of each file. |
|
Include all files in all subdirectories, in addition to those in the current directory. |
|
Controls which time is used when sorting: c = created, a = last accessed, w = last modified (written) |
|
Wide list format. File and directory names are listed in five
columns, and are sorted horizontally. Use |
|
Include the "short" 8.3 versions of long filenames. For example, Sam's File.txt has an alternate filename, samsfi~1.txt to maintain compatibilty with older applications. |
|
Display the listed years as four digits. By default, two-digit years are displayed. |