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

 

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.

 

/A: (Attribute select)

/O(rder)

/A(SCII)

/P(ause)

/B(are)

/S (file size)

/D(escriptions)

/Sn (subdirectory depth)

/F(iles)

/T(ime and date)

/H(idden directories)

/Z (file size)

/N (disable option)


 

File Selection:

 

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

 

Usage:

 

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.

 

Options:

 

/=Display the TREE command dialog to help you set the command line options. You cannot specify any other arguments on the command line.

 

/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.
dSort by date and time (oldest first); also see /T:acw
eSort by extension
gGroup subdirectories first, then files
rReverse the sort order for all options
sSort by size
tSame as d
uUnsorted

 

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

 

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