Skip to main content

Printing DOS output to printer

Issue:

Printing DOS output to printer.




Reasoning:

In some cases you may need a hard copy of a particular directory or file listing. The below method will allow you to print that information.
This solution is also a great method of testing a printer or printer port, verifying that all hardware on the computer and printer is correctly working.

Solution:

MS-DOS 2.0 to MS-DOS 6.x users
MS-DOS users using 2.x - 6.x can also use the print command.
Windows 95 and above users
To print information from MS-DOS to the printer the '> LPTx' command needs to be used after the command typed. This tells the computer to reroute all information to the appropriate LPT port, x represent the number. An example and most commonly used command is: 

DIR > LPT1 

This command tells the computer to print a directory listing, however, instead of printing it to the screen, send it to the printer, which is located on LPT1.
This command can also be used to print files by using the type command, for example:

TYPE FILE.TXT > LPT1

If, however, multiple files need to be printed, using the copy command can also be used. Below is an example:

COPY /B *.TXT LPT1

The above example will 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 will only print 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. 



Source:- computerhope.com

Comments

Popular posts from this blog

Printer Troubleshooting - Tips to Restore Laser Printer Performance

Like all laser printers, the Kyocera laser printer also has its set of performance woes that could be resolved by simple troubleshooting. When the printer has been in operation for a long time, troubles usually commence with the rubber rollers or from the sensitive components that are already aging. However if trouble emanates from the toner cartridge, a Kyocera compatible cartridge replacement can resolve the issue and allow trouble free printing to proceed once again. Defective Rollers. The function of the rubber rollers is to seamlessly move paper from one printer component to the next; failure often results in paper jams. The Kyocera laser printer employs several of these rubber rollers in its operations. This begins with the pick-up rollers from the paper tray to the OPC Drum (Organic Photo Receptive); to the fuser assembly rollers and down to the exit rollers that is responsible for the exit of paper from the printer. Since paper is abrasive, continuous contact will result in t

Samsung Printer Error Codes & Troubleshooting

Here are some of the common error codes along with tips on troubleshooting: Scanning error: This error message is essentially a hardware error. Due to poor quality of cables large data needed by a scanner cannot transmitted. You can replace USB cable and try. Paper jam: This happens when the paper has got stuck in your Printer. You need to check the sensor located beside exit rollers. Maybe it is in incorrect position, or is damaged. If nothing works, try replacing it with a new sensor. Square prints: Sometimes you may experience that your Printer is printing out squares instead of regular text. It can happen if you are using Firefox or printing content from sites which do not recognize the font used in the text. To fix this problem you will need to reinstall all relevant drivers. If this doesn’t help then visit the printers and faxes folder, select your printer and choose the properties. Choose the Advanced option in the dialog box and select the print processor. Choose a

Ink System Failure Error 0xc18a, 0xc19… – HP Printers

Hp Ink System Failure : Ink System has failed. Unable to print. Refer to Printer documentation. Error: “0xc18a…” Products that may encounter this problem: (A survey based on Fixya.com database) HP Photosmarts: C6180, C6288, C3210, C3310, C5180, C7280, C6188, D7460, C8250, C7180, C5183, C6288, C7268, C6150, C7360, C7160,c309a, C6380 . (Ink System Failure) As you can see, only Photosmarts encounter this problem, however that does not mean that other HP printers types wont be affected.Ink System Failure Error Message Displayed on a Photosmart Screen Common Error Codes: 0xc19axxxx, 0xc18a0001, 0xc18a030a, 0xc19a003f, 0xc18a0201, 0xc19a0003, 0x05d1281, oxc18a0307, 0xc18a101, 0xc052281, 0xc05d0281, 0xc18a0306, 0xc19ac3ff, 0xc18a0101, 0xc19a0031, 0xc18a0007, 0xc18a506 Troubleshooting: When you have one these error messages on your printer screen there are two things that you need to consider to enlighten yourself on what to do when you are in this kind of situation. Whorush: 3