Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I write a batch file for printing a text file to a dot matrix printer? The printer is connected to the system using USB and the port is the USB002 virtual port.

share|improve this question
Which OS are you using? – Tonin Jun 20 '13 at 11:28
using windows 7 OS – Suresh E Jun 20 '13 at 14:45

To get this to work with DOS programs, for example, you first need to share the printer. After, type: net use LPT1 \\\\yourcomputersname\printername /PERSISTENT:YES. Then you could do something like copy C:\path\to\file LPT1.

share|improve this answer
Try this instead since it's a basic text file: start /min notepad /P <filename> this prints to the default printer. – Nathan C Jun 20 '13 at 11:35
I updated my answer with a different method that we actually use on older SATO printers (parallel, but the process works the same way). – Nathan C Jun 20 '13 at 11:38
I can't really explain it much more. What OS is this? Does the printer work just printing basic text with notepad? – Nathan C Jun 20 '13 at 12:36
Printing with DOS is very very limited in terms of what you can do with it. I'll leave this question to someone who may have done this before. – Nathan C Jun 20 '13 at 14:49
As the OP mentioned before your last comment, he's using Win7. – Karan Jun 20 '13 at 18:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.