Utility to write directory structure in a text file ?

ROcHE

Senior member
Oct 14, 1999
692
0
0
I have a lot of cds and I want to make some kind of inventory. Is there a utility that can write the directory structure of a disk in a text file? I think that the old "dir" could do this but I don't remember how.

Anyone?
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
DIR [directory] /S /AD > textfile.txt

Example (assuming your CD-ROM drive letter is "D"):
DIR D:\ /S /AD > textfile.txt

Don't include the brackets when you type the directory/folder. Place it inside of a text file and rename the extention to "BAT" and you have an executable "program".

/S - Checks all subdirectories

/AD - Lists folders and not files

>filename.ext - Redirects text output to a file
>>filename.ext - Adds the text to the end of an existing text file without replacing it
 

ugh

Platinum Member
Feb 6, 2000
2,563
0
0
You might want to add the /B parameter to the dir command for printing the file list. The parameter is for bare format.
 

VBboy

Diamond Member
Nov 12, 2000
5,793
0
0
Download a real file organizer like Elcomsoft's Advanced Disk Catalog.. It's very nice, and there are many similar programs available...

And if you don't remember how to use Dir, type "Dir /?" at your command prompt.
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Originally posted by: Nothinman
find . -type d > /tmp/listing .txt

tree -x -d . > /tmp/listing.txt

hehe damn *nix guys. :D

Try this in dos:

tree /a > myfolderlist.txt

or

tree /a /f > mylistwithfilenames.txt