Printing DOS output to printer

Updated: 04/26/2017 by Computer Hope

Canon printerTip: This document is for older computers, if you are running anything later than Windows XP or have a USB printer these steps will not work. However, the output command can still be used in all versions of Windows to print the listing of files or other commands to a text file that can then be printed.

To print information from MS-DOS to the printer the '> LPTx' command needs to be used after the command typed. This command tells the computer to reroute all information to the appropriate LPT port, x represent the port number. An example and most commonly used command is shown below.


This command tells the computer to print a directory listing using the dir command, however, instead of printing it to the screen, send it to the printer, which is located on LPT1.

The command below can use the type command to print files by using the below command.


If, however, multiple files need to be printed, using the copy command can also be used, as shown below.


The above example uses the copy command to copy all txt or text files in the current directory to the LPT1 port.

When using the above example, it is important to realize that this only prints ASCII files and not BINARY or encrypted files. Meaning that only text files will print using this method; attempting to print a Microsoft Word, Excel, Works, Word Perfect or any similar program that requires a program will not work.

Note: When using the > LPTx command in MS-DOS, because the printer will not be sent a page feed command, the printer may not eject the paper from the printer. To eject the paper manually, use the button for FF (form feed) or page feed to eject your paper. If you have a dot matrix printer, use the hand wheel to manually eject the paper.

MS-DOS 2.0 to MS-DOS 6.x users

MS-DOS users using 2.x - 6.x can also use the print command.