In Win7-64bit Home Premium, the "tree" CLI (Command Line Interface) command can be used to do this in 3 different ways. You can produce your file listing in a single command string:
Suppose we want to make a nested tree listing from (say), "C:\Windows\Boot", then we can try it:
- (a) In Windows Explorer: go to the directory where you want to make a nested tree listing from (C:\Windows\Boot), then type into the address line "tree /f", then press the Enter key. Except I haven't figured out how to force the Command window to stay open after the task completes - "/p" for pause doesn't seem to work, neither does piping it into more with "|more" or outputting it to a file with something like ">C:temp\treetest.txt".
- (b) In xplorer²: go to the directory where you want to make a nested tree listing from (C:\Windows\Boot), then type into the address line the "$" prefix, then "tree /f", then press the Enter key. That produces the tree correctly.
- (c) From a Run box: Press Winkey+R, then type "cmd", then the CLI command "cd C:\Windows\Boot", then "tree /f", then press the Enter key. That produces the tree correctly.
A single command string: In both (b) and (c) you can just type in:
tree /f /a >C:\temp\treetest.txt, then press the Enter key.
The "
/a" switch makes the output in ASCII. The "
>" redirects the output to the file "
C:\temp\treetest.txt".
(When you print or display the file, ASCII looks clearer/neater than the extended character set that the switch "/f" apparently defaults to.)