Page 1 of 1

Dirtree printouts?

Posted: Thu May 31, 2007 1:51 pm
by Takitothemacs
anyone know of any commands around these days that will allow me to print the directory tree out without having to piece it together from a load of screenshots... and in some instances even print out file lists with attriutes etc...

sure Xest will remember the days when this could be done from DOS... ;)

Posted: Thu May 31, 2007 2:27 pm
by Xest
Think the closest you'll get is just dumping it to a text file using something like:

dir /s > blah.txt

Can add some other options in, /B removes all the crap and you can use /A to filter results:

dir /AD /S /B > test.txt

Will list all the directories only into test.txt with no crap for example. The /S switch is key for iterating through all subdirectories and including them in the output dump. If you need owner information you'll have to use /Q, I don't think you can get it to print further NTFS permissions like you can on *nix systems though.

If you want anything more powerful than the dir switches will allow then you'll probably have to hack together a quick and dirty Perl/Python/Windows Scripting Host script.

Posted: Thu May 31, 2007 4:16 pm
by Lieva
[quote="Takitothemacs"]
sure Xest will remember the days when this could be done from DOS... ]

I can too...

Posted: Thu May 31, 2007 4:28 pm
by Xest
Probably cos you're older than me :p