Given a folder on the local file system, what I need to do is this:
- Get the recursive listing of all the subfolders/files in it
- Output this in a flat text file
- Then recreate this folder structure in a tree representation
So what information and how do I need to store it in that file in order to achieve this in an efficient manner?
Efficient manner in this case means spending as little time as possible creating that tree structure given a potential large number of subfolders/files. Obviously I would need to keep aware of the parent-child relationships between folders and perhaps something like file extensions and size.
I can use the facilities of Windows at the command line and/or other software so there is no limitation there.
This question might spill through in having someone recommend some library for the third step and going back from there, and I don't mind that as long as it's clear about the rest of the question.