Right,So This Is How You’d Go About Drawing And Saving Directory And Folder Structures Using The Tree Command In Windows cmd.
1. Outputting Only Folders In A Tree Structure.
1
$ tree {Folder Name}
2. Including files in the tree structure
1
tree /f {Folder Name}
3. Displaying the tree structure using ASCII characters
1
tree /f /a {Folder Name}
4. Saving the output results (Redirect Output)
You Use The Cmd’s Redirect Output Overwrite And Append Characters, >and>>,To Save The Output Results.
1 2 3 4
# 1. Creating a File (if a file with the same name exists,it will be overwritten) $ tree Folder Name > File Name # 2. Appending content (appending content to the existing file) $ tree Folder Name >> File Name