Sending directory listing to a file

  • Thread starter Thread starter Liz
  • Start date Start date
L

Liz

I am trying to find a way to take the list of directories
that I see when a run Explorer to a file. Is there a way
to do this?
 
I'm not certain what you mean, but if you're saying you'd like to get a list
of directories in a certain path and list them to a file, you open a command
prompt (cmd.exe) and enter this:

dir /b /a:d C:\>C:\dirs.txt

That will list the directories in the root of your C drive and dump the list
to C:\dirs.txt

Take a look at
dir /?

for info about the switches for dir.

Also, >>C:\dirs.txt as opposed to >C:\dirs.txt would ~append~ the dirs.txt
file if it already exists. Just the single > will overwrite it.

Ray at work
 
Liz said:
I am trying to find a way to take the list of directories
that I see when a run Explorer to a file. Is there a way
to do this?

tree "c:\" > %temp%\yourfile.
 
Back
Top