New
#21
The tree command does what you asked as far as I can see. The hard part is finding something that will display the output correctly once it's captured. I use the X2 Programmers Editor for this. Neither Notepad or Wordpad handle it.
Ah ha! Word handles it if you use the DOS encoding.
This is what it looks like when I edit the captured output of the tree command in X2 from a Command Prompt and Word:
which is what it looks like from the command prompt itself.