Microsoft KB Archive/65445

{|
 * width="100%"|

Printing Directory Listings from Windows File Manager

 * }

Q65445

3.00 3.00a 3.10 3.11

WINDOWS

kbusage kbtool

-

The information in this article applies to:


 * Microsoft Windows versions 3.0, 3.0a, 3.1, 3.11

-

SUMMARY
There is no direct method to print a listing of files or directories from Microsoft Windows File Manager.

To work around this limitation, you can print the list of files using a batch file. Or, if the file list is short enough, you can press the ALT+PRINT SCREEN key combination to copy the active File Manager window, paste the information into Microsoft Windows Paintbrush, and then print the bitmap from Paintbrush.

If you are using Windows 3.0 or 3.0a, you can print the list of files from MS-DOS Executive (MSDOS.EXE).

Printing from a Batch File
You can print a directory listing in Windows by creating an MS-DOS batch file 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 "dirprint.bat : " where : points to the directory you want to print. For example, type the following to print a listing of the Windows directory on drive C: "dirprint.bat c:\windows" 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 &quot;Printing to a PostScript Printer&quot; section below for more information.

Printing from MS-DOS Executive
Microsoft Windows MS-DOS Executive is included with Windows versions 3.0 and 3.0a but not later versions. If you upgraded from Windows 3.0, you may still have the MS-DOS Executive file (MSDOS.EXE) in your Windows program directory.

MS-DOS Executive is the operating shell for earlier versions of Windows. MS- DOS Executive can print directory listings that include all the files in that directory plus a listing of all subdirectories in that directory. The only 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: "msdos.exe" This file should be in the Windows program directory. </li> When MS-DOS Executive is running, choose the directory that you want to print, then choose Print from the File menu.</li></ol>

Printing to a PostScript Printer
If you are using a PostScript printer, follow the procedure below to print a directory.

 Exit to the MS-DOS prompt.</li>  Type the following: "dir {path} > dirlist.dat&quot;"</li> Type exit</li> In Windows, run Notepad, and open the file.</li> Print the file to your PostScript printer.</li></ol>

Additional query words:

Keywords :

Issue type :

Technology : kbWin3xSearch kbWin300 kbWin300a kbWin310 kbWin311