To print a directory / file listing in Windows 95
Here's how you print a directory listing from a DOS window during a Win95 session. Go into the directory you want printed by using the CD command (or any other way you have of moving among folders). Then type dir > Prn and press ENTER. This sends a directory listing to your printer.
A more elegant solution (which takes more time and hassle to set up but is more flexible and quicker later on) is to create a Print Directory menu choice that you can use inside Windows Explorer. Here's how to do it:
Now, when you open Explorer and right-click any folder, you'll see the choice Print This Directory. If you select it, the batch file will execute a DIR command and bring up the directory listing in WordPad, where you can easily format and print it.
If using this custom feature leaves an unwanted DOS window open, you can modify the properties for Printdir.bat (by right-clicking the open DOS window's title bar, then right-clicking Properties) and check the box that says Close On Exit. While in the Properties dialog box, consider setting it to Run Minimized rather than Normal Window.
With either of these techniques, you also can use the DIR command's powerful parameters. For example, DIR/O:N would create and alphabetized list of file names, and DIR/S would include all the files in the subdirectories. For more information about the optional features of DIR, type dir/? At a DOS prompt.
Submitted by
Mitch KatowitzReturn to
Home