How to get tree of folders in CMD?
In Windows CMD, I use tree c: /f
to get a tree of all directories resided in C:. But now I only want to tree out the only sub-directory folders (not files). How to I exclude files in tree command?
Leave out the "/F" switch, since it's what causes Files to be included.
From tree /?
:
Graphically displays the folder structure of a drive or path.
TREE [drive:][path] [/F] [/A]
/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.
to output to txt file use command: (you will find in on drive C, as specified below)
tree /a > "C:\_TREE-Output.txt"