text stringlengths 0 4.23k |
|---|
Defines variable with specified value. |
/l <dir> |
Location to place destination (default is current directory). |
/v[<n>] |
Set debugging verbosity level (0=none,...,3=full). |
/? |
Displays help at the command prompt. |
<source> |
<destination> |
<directives_file> |
<value> |
<dir> |
<n> |
dir |
Displays a list of a directory's files and subdirectories. If used without parameters, this command displays the disk's volume label and serial number, followed by a list of directories and files on the disk (including their names and the date and time each was last modified). For files, this command displays the name extension and the size in bytes. This command also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk. |
The dir command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE). |
Syntax |
dir [<drive>:][<path>][<filename>] [...] [/p] [/q] [/w] [/d] [/a[[:]<attributes>]][/o[[:]<sortorder>]] [/t[[:]<timefield>]] [/s] [/b] [/l] [/n] [/x] [/c] [/4] [/r] |
Parameters |
Parameter |
Description |
[<drive>:][<path>] |
Specifies the drive and directory for which you want to see a listing. |
[<filename>] |
Specifies a particular file or group of files for which you want to see a listing. |
/p |
Displays one screen of the listing at a time. To see the next screen, press any key. |
/q |
Displays file ownership information. |
/w |
Displays the listing in wide format, with as many as five file names or directory names on each line. |
/d |
Displays the listing in the same format as /w, but the files are sorted by column. |
/a[[:]<attributes>] |
Displays only the names of those directories and files with your specified attributes. If you don't use this parameter, the command displays the names of all files except hidden and system files. If you use this parameter without specifying any attributes, the command displays the names of all files, including hidden and system files. The list of possible attributes values are:d - Directoriesh - Hidden filess - System filesl - Reparse pointsr - Read-only filesa - Files ready for archivingi - Not content indexed filesYou can use any combination of these values, but don't separate your values using spaces. Optionally you can use a colon (:) separator, or you can use a hyphen (-) as a prefix to mean, "not". For example, using the -s attribute won't show the system files. |
/o[[:]<sortorder>] |
Sorts the output according to sortorder, which can be any combination of the following values:n - Alphabetically by namee - Alphabetically by extensiong - Group directories firsts - By size, smallest firstd - By date/time, oldest firstUse the - prefix to reverse the sort orderMultiple values are processed in the order in which you list them. Don't separate multiple values with spaces, but you can optionally use a colon (:).If sortorder isn't specified, dir /o lists the directories alphabetically, followed by the files, which are also sorted alphabetically. |
/t[[:]<timefield>] |
Specifies which time field to display or to use for sorting. The available timefield values are:c - Creationa - Last accessedw - Last written |
/s |
Lists every occurrence of the specified file name within the specified directory and all subdirectories. |
/b |
Displays a bare list of directories and files, with no additional information. The /b parameter overrides /w. |
/l |
Displays unsorted directory names and file names, using lowercase. |
/n |
Displays a long list format with file names on the far right of the screen. |
/x |
Displays the short names generated for non-8dot3 file names. The display is the same as the display for /n, but the short name is inserted before the long name. |
/c |
Displays the thousand separator in file sizes. This is the default behavior. Use /-c to hide separators. |
/4 |
Displays years in four-digit format. |
/r |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.