• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2460
  • Last Modified:

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?
0
omer_667721
Asked:
omer_667721
  • 4
  • 3
1 Solution
 
LucFCommented:
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
 
LucFCommented:
Never tried it, but I can't see why not...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
LucFCommented:
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
 
LucFCommented:
You're welcome :)

LucF
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now