Please enable JavaScript to view this site.

Take Command / TCC Help v. 25

Purpose:Display a graphical directory tree


Format:TREE [/= /A:[-|+]rhsadecijopt /A /B /D /F /H /Nj /O:[-]acdeginorstuz /P[n] /S[n] /T[:a|c|w] /Z ] dir...


dirThe 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 Selection:


Supports command dialog, attribute switches, extended wildcards, ranges (with /F), and multiple file names.


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.


/ADisplay 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.


/BDisplay the full pathname of each directory, without any of the line-drawing characters.


/DDisplay file and directory descriptions.


/FDisplay 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.


/HDisplay hidden as well as normal directories. If you combine /H and /F, hidden files are also displayed.


/NDisables the specified options:


jSkip junctions


/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:


nSort by filename and extension, unless e is explicitly included. This is the default.
-Reverse the sort order for the next sort key
aSort names and extensions in standard ASCII order, instead of numerically when numeric substrings are included in the name or extension.
cSort by compression ratio
dSort by date and time (oldest first); also see /T:acw
eSort by extension
gGroup subdirectories first, then files
iSort by description
oSort by owner
rReverse the sort order for all options
sSort by size
tSame as d
zSame as s


/P[n]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. The /P option has an optional argument n that specifies the number of seconds to wait for a keystroke before continuing.


/SIf 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).


/TDisplay 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).


/ZDisplay the size of each file. /Z without a /F will display the subdirectory tree sizes (the size of the current directory and all of its subdirectories).