need to create a directory tree from a base dir in dos

I need to know if anyone know some utility program that runs on the dos command line
that can create a list of all the directory under the start folder.  (sort of like walk_dir in Unix alike os)

sort of like explore a give folder, but only display the sub folder below.  but like to output to a text file.

i.e  start from c:\
need to an output file like

c:\dir1
c:\dir1\sub_1
c:\dir1\sub_1\a
c:\dir1\sub_1\b
c:\dir2\sub_2
etc..

thanks
mshox1Asked:
Who is Participating?
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
dir /s /b /ad

/s include sub directories
/b bare format
/ad directories only (no files).

To redirect to a file

dir /s /b /ad > output.txt
0
 
fred_michielsCommented:
on command line type :

dir /d > c:\text.txt

This will create a text.txt file on the root with all your directories of root.
0
 
Kruger_monkeyCommented:
tree > listing.txt will also do it, but will give you an actual tree listing, linking each folder as appropriate.

0
 
mshox1Author Commented:
thank you very much.  this is precise what I am looking for.

thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.