PDA

View Full Version : Saving a listing of a directory's contents to a text file



12-12-2001, 05:23 PM
Anyone know how I can save a listing of a directory's contents to a text file?

12-12-2001, 05:56 PM
in a DOS window, type 'dir dirname > c:\file_you_want.txt'

(Type 'dir /?' for a list of options you can put in the command).

The '>' is the redirection operator. It will cause anything which normally displays on the screen to go to a file or device. The only device usually used is LPT1:, others can be dangerous.

13-12-2001, 02:25 PM
There is a much simpler way. I have a neat little program called ExpPrint which allows you simply to right-click on the directory and it will print the contents of the directory (configurable). I got it at
http://ourworld.compuserve.com/homepages/jdd/
but I don't know if the address is still good. If the address is not good, I'll send it to anyone who wants it (freeware). It's only 152K and works fine.