I need to create a text file of all directories on D drive and print it. I am at command prompt D:\. I am not familiar with dos prompt commands unfortunately, is there a reference book or a list somewhere? Thanks. (-: if you don't know, ask.
where dir is the command for directory>> means to pipe the output and APPEND
dirlist.txt of course is the file you are exportin to and it will reside in your current directory, or you could put it anywhere you want....
I DID IT!
Kept trying different things and
DIR D:\ /AD /S>>D:\dirlist.txt
got me a text file of all directories and subdirectories.
EUREKA! if you don't know, ask.
If you need a list of command line switches for DIR use 'dir /?' (miss out the quotes of course) this works for most command line tools add /? to the command in question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.