‘tree’ command: Directory structure in tree format

January 5, 2012 | Windows

Tree Windows DOS command

'tree' DOS command is pretty much useful to take the tree structure of any directory (including its sub-directories and files also) on windows in the form of text.
For example:

|   OtherFile.txt
|   ParentTextDocument.txt
|       SubTextDocument1.txt
    |   SubTextDocument2.txt

Open command prompt in windows and go to the directory of which physical directory structure you need to print.
Run the following command:

C:\ParentFolder\tree /a /f

That's all, You'll get the above folder structure.

To export the directory structure into a file use the following command:

C:\ParentFolder\tree /a /f sample.txt

Tags: ,

Leave a Reply

If you have a Tip, Comment, Article or anything you want to share, please send it to: i@poisure.com