Dos tree or directory lister old school

Sometimes it is necessary to get all the files you have in a ASCII document. Their are several way of getting this information:

You can use e.g.: directory lister or a similar program that makes is nice and colourful.

But if you just need it quick and for once or twice their are already board tool that do the same.

Open a cmd shell and enter:

dir /?
tree /?

What can you see ? Quite a few additzional options.

DIR

To get your folder content with dir move to the folder and enter on your cmd:

dir /a /s
dir /a /s > textfile.txt

The generated textfile contains all information about folders files and some more details.

But it is not really readable.

TREE

If you can forget about file attributes like date and owner and you just want to get the folder content use tree.

Open a cmd and move to your folder you want to fetch and enter:

tree /a /f
tree /a /f > myfolder.txt

With this trick you get a text file that contains folder and filenames that are stored in the selected folder with subfolders.

Open your file with notepad oder notepad++ and search for the characters you dont need and replace them by nothing and you get a nice file table list.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *