This article was previously published under Q65445
3.00 3.00a 3.10 3.11 WINDOWS kbusage kbtool
There is no direct method to print a listing of files or directories fromMicrosoft Windows File Manager.
To work around this limitation, you can print the list of files using abatch file. Or, if the file list is short enough, you can press theALT+PRINT SCREEN key combination to copy the active File Manager window,paste the information into Microsoft Windows Paintbrush, and then print thebitmap from Paintbrush.
If you are using Windows 3.0 or 3.0a, you can print the list of files fromMS-DOS Executive (MSDOS.EXE).
Printing from a Batch File
You can print a directory listing in Windows by creating an MS-DOS batchfile with the following steps:
Using a text editor such as Microsoft Windows Notepad, create a batch file with the following line:
DIR %1 > LPT1 (or another appropriate printer port)
Save the file as DIRPRINT.BAT in a directory that is in your PATH statement.
In File Manager, choose Run from the File menu.
Type the following
where <drive>:<path><directory> points to the directory you want to print. For example, type the following to print a listing of the Windows directory on drive C:
An MS-DOS screen appears briefly and then a batch file is run, sending the directory information to the printer. You are then returned to File Manager.
NOTE: This procedure does not work with PostScript printers. Refer to the"Printing to a PostScript Printer" section below for more information.
Printing from MS-DOS Executive
Microsoft Windows MS-DOS Executive is included with Windows versions 3.0and 3.0a but not later versions. If you upgraded from Windows 3.0, you maystill have the MS-DOS Executive file (MSDOS.EXE) in your Windows programdirectory.
MS-DOS Executive is the operating shell for earlier versions of Windows.MS-DOS Executive can print directory listings that include all the files inthat directory plus a listing of all subdirectories in that directory. Theonly directory MSDOS.EXE cannot print is the root directory.
To use MSDOS.EXE for printing directories:
In Program Manager, choose Run from the File menu.
In the Command Line box, type the following:
This file should be in the Windows program directory.
When MS-DOS Executive is running, choose the directory that you want to print, then choose Print from the File menu.
Printing to a PostScript Printer
If you are using a PostScript printer, follow the procedure below toprint a directory.