Created
December 10, 2014 16:06
-
-
Save Arahnoid/63b824c4842a70d37d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate Txt File With Directory Tree | |
http://superuser.com/questions/258287/how-can-i-export-a-directory-structure | |
Assuming your directory tree is of reasonable size, you could also use the built in tree command, which produces a rather pretty looking directory tree. Unfortunately this prettiness is difficult to get working outside of a cmd instance, so you'll probably want to tell it to just use ascii characters with the /A switch. | |
### Example: | |
From a small multi-level structure | |
``` | |
+---A | |
| +---A | |
| \---B | |
+---B | |
| \---A | |
| \---A | |
\---C | |
``` | |
You can then redirect this to a file using a command like: | |
``` | |
tree /A ["directory path"] > tree.txt | |
``` | |
Where the directory path is optional, but useful if you want to tree something which isn't the current working directory. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment