|Purpose:||Display a graphical directory tree|
|Format:||TREE [/= /A:[-|+]rhsadecijopt /A /B /D /F /H /Nj /O:[-]adegnrstu /P /S[n] /T[:a|c|w] /Z ] dir...|
|dir||The directory to use as the start of the tree. If one or more directories are specified, TREE will display a tree for each specified directory. If none are specified, the tree for the current working directory is displayed.|
File Completion Syntax:
The default filename completion syntax is: dirs
The TREE command displays a graphical representation of the directory tree using standard or extended ASCII characters. For example, to display the directory structure on drive C:
[c:\] tree c:\
TREE uses the standard line drawing characters in the U.S. English extended ASCII character set. If your system is configured for a different country or language, or if you use a font which does not include these line drawing characters, the connecting lines in the tree display may not appear correctly (or not appear at all) on your screen. To correct the problem, use /A, or configure the TCC to use a font which can display standard extended ASCII characters.
You can print the display, save it in a file, or view it with LIST by using standard redirection symbols. Be sure to review the /A option before attempting to print the TREE output. The options discussed below specify the amount of information included in the display.
|/=||Display the TREE 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.|
|/A||Display the tree using standard ASCII characters. You can use this option if you want to save the directory tree in a file for further processing or print the tree on a printer which does not support the graphical symbols that TREE normally uses.|
|/A:[..]||Select only those files that match the specified attribute(s).See Attribute Switches for details.|
You can specify /A:= to display a dialog to help you set individual attributes.
|/F||Display files as well as directories. If you use this option, the name of each file is displayed beneath the name of the directory in which it resides.|
|/H||Display hidden as well as normal directories. If you combine /H and /F, hidden files are also displayed.|
|/O:...||Sort the files before processing. You may use any combination of the sorting options below. If multiple options are used, the listing will be sorted with the first sort option as the primary key, the next as the secondary key, and so on:|
|n||Sort by filename and extension, unless e is explicitly included. This is the default.|
|-||Reverse the sort order for the next sort key|
|a||Sort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension.|
|d||Sort by date and time (oldest first); also see /T:acw|
|e||Sort by extension|
|g||Group subdirectories first, then files|
|r||Reverse the sort order for all options|
|s||Sort by size|
|t||Same as d|
|/P||Wait for a key to be pressed after each screen page before continuing the display. Your options at the prompt are explained in detail under Page and File Prompts.|
|/S||If you specify a number after the /S, TREE will limit the subdirectory recursion to that number. For example, if you have a directory tree "\a\b\c\d\e", /S2 will only affect the "a", "b", and "c" directories. If you do not specify a number, /S shows the file sizes (see /Z).|
|/T||Display the time and date for each directory. If you combine /T and /F, the time and date for each file will also be displayed.|
By default, the time and date shown will be of the last modification. You can select a specific time and date stamp by using the following variations of /T:
/T:a Last access date and time (access time is not displayed on VFAT and FAT32 volumes).
/T:c Creation date and time.
/T:w Last modification ("write") date and time (default).