How to print from the command line to USB printer?

I run win xp and i want to print files from the command line to my USB printer.
I wrote this int the CMD:
print /d:USB001 C:\111.txt
but then i get the message:
unable to initialize device USB001
Is that possible?
omer_667721Asked:
Who is Participating?
 
LucFConnect With a Mentor EMEA Server EngineerCommented:
Hi omer_667721,

Share the printer on the network, then use the following command:

Net use lpt1: \\localhost\<printersharename> /PERSISTENT:YES

Now you can print from dos using the normal lpt1: port :)

Greetings,

LucF
0
 
omer_667721Author Commented:
Is it possible to print also files like HTML or DOC in that way?
0
 
LucFEMEA Server EngineerCommented:
Never tried it, but I can't see why not...
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
omer_667721Author Commented:
I just tried to print a DOC file and i got gibrish...
when i tried to print HTML file i fot only the source code of the HTML
0
 
LucFEMEA Server EngineerCommented:
For the html, that's normal, and for the DOC, if it's not plain text, it's also to be expected.
0
 
omer_667721Author Commented:
OK
thanks
0
 
LucFEMEA Server EngineerCommented:
You're welcome :)

LucF
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.