Tech Support > Operating Systems > Windows 2000 > Sending directory listing to a file
Sending directory listing to a file
Posted by Liz on November 4th, 2003


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?

Posted by Ray at on November 4th, 2003


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" <anonymous@discussions.microsoft.com> wrote in message
news:02f601c3a31c$e7117a80$a501280a@phx.gbl...


Posted by Phil Robyn on November 4th, 2003


Liz wrote:

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

--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l



Similar Posts