I have a text file with a folder structure:
+---A Momentary Lapse of Reason
+---A Saucerful of Secrets
+---Animals
+---Atom Heart Mother
+---Delicate Sound Of Thunder
+---Echoes- The Best of Pink Floyd
| +---Echoes- The Best of Pink Floyd Disc 1
| \---Echoes- The Best of Pink Floyd Disc 2
+---Is There Anybody out There- The Wall- Live 1980-1981 Disc 1
+---Is There Anybody out There- The Wall- Live 1980-1981 Disc 2
\---Works
I received it from windows CMD
using the tree
command.
I wanted to know if there is a simple way to convert this structure into json
?
For something like this it isn't too hard to do it manually, but I need to do it for a 12TB
folder.
OK, I'm not so familiar with JSON. I looked at this thread and wrote a batch script. Please let me know, if I can something improve.
Usage:
tree2json [startfolder] [>file.txt]