Microsoft DOS tree command

Quick links

About tree
Availability
Syntax
Examples

About tree

Allows the user to view a listing of files and folders in an easy to read listing.

Availability

The tree.com is an external command that is available in the below Microsoft operating systems.

All Versions of MS-DOS
Windows 2000
Windows XP
Windows Vista
Windows 7

Syntax

TREE Drive:\ Path /f /a

Drive:\Path Drive and directory containing disk for display of directory structure.
/f Displays file names in each directory.
/a ext characters used for linking lines, instead of graphic characters. /a is used with code pages that do not support graphic characters and to send output to printers that do not properly interpret graphic characters.

Tree directory structureExamples

tree

The tree command typed alone will list a tree listing and overview of the current directory. The picture shows a basic example of what a directory tree overview may look like.

In this example, C: is the current directory, "banners" is one of the many directories in the current directory, and "big" is a subdirectory of the "cdn" directory.

  • See our tree structure definition if you need further information understand the structure of a tree.