Purpose: | Display the current directory stack |
Format: | DIRS [/= +n -n /M /P /Q] [name] |
+n / -n | Rotate the directory stack up or down n entries |
name | Display only directories which match name |
See also: PUSHD, POPD, @DIRSTACK and Directory Navigation.
File Completion Syntax:
The default filename completion syntax is: dirs
Usage:
The PUSHD command adds the current default drive and directory to the directory stack, a list maintained by TCC. The POPD command removes the top entry of the directory stack and makes that drive and directory the new default. The DIRS command displays the contents of the directory stack, with the most recent entries last (i.e., the next POPD will retrieve the last entry that DIRS displays).
The name to match can include wildcards or a regular expression (prefixed by ::).
The directory stack holds 16K characters, enough for 400+ typical drive and directory entries.
Examples:
To change directories and then display the directory stack:
[c:\] pushd c:\database
[c:\database] pushd d:\wordp\memos
[d:\wordp\memos] dirs
c:\
c:\database
You can optionally display only those directories in the stack which match a name. For example:
DIRS c: | (only display directories on the C: drive) |
DIRS \\server\share | (only display directories on this UNC share name) |
Options
/= | Display the DIRS command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog. |
/P | Wait for a key after displaying each page of the list. Your options at the prompt are explained in detail under Page and File Prompts. |