Put file names into a txt file

  • Thread starter Thread starter Lavern Gingerich
  • Start date Start date
L

Lavern Gingerich

I know there is a way to put all the file names from one
directory into one .txt file. It's done through the
command prompt window, but I don't remember the command
that's used.

dir /b prints it on the screen, but I would like to save
the info in a file. Can anyone help?

Thanks,
Lavern
 
from the wonderful said:
I know there is a way to put all the file names from one
directory into one .txt file. It's done through the
command prompt window, but I don't remember the command
that's used.

dir /b prints it on the screen, but I would like to save
the info in a file. Can anyone help?

dir /b > <filename> put it in <filename>

in general > pipes the screen output from any 'dos' command someplace
else (like a file)

(emailed, since the OP was using the dreaded CDO interface).
 
"Dir /b >List.txt"

--
Regards,
Ramesh [MS-MVP]
AIM: SRamesh2k


~ Please reply to newsgroup ~


I know there is a way to put all the file names from one
directory into one .txt file. It's done through the
command prompt window, but I don't remember the command
that's used.

dir /b prints it on the screen, but I would like to save
the info in a file. Can anyone help?

Thanks,
Lavern
 
Lavern said:
I know there is a way to put all the file names from one
directory into one .txt file. It's done through the
command prompt window, but I don't remember the command
that's used.

dir /b prints it on the screen, but I would like to save
the info in a file. Can anyone help?

Thanks,
Lavern

You're almost there. Use the ">" character to direct the output to a
file, e.g.:

dir /b > directorylist.txt
 
Thanks for your help!
-----Original Message-----


You're almost there. Use the ">" character to direct the output to a
file, e.g.:

dir /b > directorylist.txt


.
 
Greetings --

From the command prompt (Start > Run > Cmd.exe), simply change to
the desired directory and type "dir > filelist.txt" or "dir > lpt1,"
just as you used to do in DOS. Any of the switches for the DIR
command (type "dir /?") will work with this command, if you wish to
modify the output. You can then subsequently edit the resulting text
file using Word.

Alternatively:

HOW TO Add a Print Directory Feature for Folders in Windows XP
http://support.microsoft.com/?kbid=321379


Bruce Chambers

--
Help us help you:



You can have peace. Or you can have freedom. Don't ever count on
having both at once. -- RAH
 
dir *.*>c:\mydocuments\files.txt



| Lavern Gingerich wrote:
| >
| > I know there is a way to put all the file names from one
| > directory into one .txt file. It's done through the
| > command prompt window, but I don't remember the command
| > that's used.
|
| http://www.bootdisk.com/bootlist/116.htm#2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top