Purpose: Display a graphical directory tree.
Format: TREE [[/A:[[-|+]rhsadecijopt /A /B /D /F /H /Nj /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.
/A: (Attribute select)
/N (disable option)
/S (file size)
/T(ime and date)
/Z (file size)
Supports attribute switches, extended wildcards, ranges (with /F), and multiple file names.
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.
/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.
/B Display the full pathname of each directory, without any of the line-drawing characters.
/D Display file and directory descriptions.
/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.
/N Disables the specified options:
j Skip junctions (when used with /S)
/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.
/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).
/Z Display the size of each file. This option is only useful when combined with /F.