Following up to my own post here. A better way to capture the
hierarchy ist to use "tree >tree.txt" instead. This is as close to an
explorer-like view as you can get without an additional tool. All I
need in this output would be a way to collapse the directories.
Replace the graphical chars of the tree with spaces. You shouldn't use
the ASCII variant of output (/a switch) because you will encounter less
conflicts with chars inside your file and directory names with the chars
of the extended graphical char set.
After that you can view the output inside with the folding editor of
your choice. (It needs to support folding by white space amounts.)
I recommend using the stand alone version of SciTE named SC1 which can
be found here:
http://scintilla.sourceforge.net/SciTEDownload.html
You need to switch to a language which supports folding (like VBScript
or Python). If you activate Fold Margin within the View menu you can
expand or collapse the folds by clicking on the '+' and '-' signs on
the left margin. From the documentation:
| The fold point markers can be clicked to expand and contract folds.
| Ctrl+Shift+Click in the fold margin will expand or contract all the top
| level folds. Ctrl+Click on a fold point to toggle it and perform the
| same operation on all children. Shift+Click on a fold point to show all
| children.
HTH.
BeAr