Home > Commands N-Z > Commands T

TREE


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Graphically displays the structure of a directory.


Syntax

TREE /?

TREE [drive:][path] [/F] [/A]


Parameters
drive: (v2.0 Win95 NT3.5)
Specifies the drive that contains the disk for which you want to display the directory structure.
path (v4.0 Win95 NT3.5)
Specifies the directory for which you want to display the directory structure.

Switches
/? (NTXP)
Displays help.
/A (v4.0 Win95 NT3.5)
Specifies that TREE is to use text characters instead of graphic characters to show the lines linking subdirectories. Use this switch with code pages that do not support graphic characters and to send output to printers that don't properly interpret the graphic characters.
/F (v2.0 Win95 NT3.5)
Displays the names of the files in each directory.

Related

For information about displaying the contents of a directory, see the DIR command.


Notes
TREE Structure

The structure that TREE displays depends upon the parameters you specify on the command-line. If you do not specify a drive or path, TREE displays the tree structure beginning with the current directory of the current drive.


Examples

To display the names of all the subdirectories on the disk in your current drive, type:

    TREE \

To display, one screen at a time, the files in all the directories on drive C, type:

    TREE C: \ /F | MORE

To print the same list that the previous example displayed, type:

    TREE C: \ /F > PRN

Errorlevels

none.


Availability
External
DOS
v2.0 v2.01 v2.05 v2.10 v2.11 v2.11R v2.12 v2.2 v2.25 v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1
Windows
Win95
Windows NT
NT3.5 NT4 NT2000 NTXP NT2003