How do I print from dos

July 12, 2019 at 09:52:10
Specs: Windows 7
How do I print from dos? I have a printer connected to my PC via USB port. I have tried this:
NET USE LPT2 \CORE205HP\"ZDesigner ZD420-203dpi ZPL" /Persistent:Yes
PRINT /D:LPT2 c:\temp\\testprint2.txt

It does not work. What am I missing


See More: How do I print from dos

Reply ↓  Report •

#1
July 12, 2019 at 10:12:33
Is this pure dos or windows command prompt? Are you sure the printer is at LPT2? What happens if you just type print c:\temp\testprint2.txt and enter?

Reply ↓  Report •

#2
July 12, 2019 at 11:12:42
Dos from windows 7. The printer is connected to a USB port. I just assumed I had to redirect it to another port to print. Also, I have a network printer as my default printer, so this is the second print driver on my PC. If you have a suggestion aside from LPT2 I will try it. If I type print C:\temp\testprint2.txt I see:

Unable to initialize device PRN


Reply ↓  Report •

#3
July 12, 2019 at 17:46:48
So you have a network printer and then this other one on USB and you want to print to the one on USB? I guess you've seen this:

https://www.itprotoday.com/compute-...

I think that command prints to the network printer. You can try using the DOSPRN command it recommends but I think in order for it work you'd have to make the USB printer the default printer. I don't think dos has any other way to find a printer that's not at an LPT port.


Reply ↓  Report •

Related Solutions

#4
July 12, 2019 at 19:12:56
"Dos from windows 7."

That's not DOS. That is "Command Prompt"

"Channeling the spirit of jboy..."


Reply ↓  Report •

#5
July 15, 2019 at 06:58:30
Okay Command prompt not DOS, understood.

The instruction from the ITprotoday web site instructs the user to print through notepad. I can change what my default printer is, but that will not work because this printer is a label printer, and it does not print properly through notepad.

Thanks to all for your time.

If anyone else has ideas, please advise.


Reply ↓  Report •

#6
July 15, 2019 at 09:02:03
Did you try the DOSPRN command it linked to?

Reply ↓  Report •

#7
July 15, 2019 at 09:40:45
Yes, I installed DOSPRN, but when I tried printing from the DOSPRN settings screen, my file did print, but it did not print the label the way it was supposed to. This is a Zebra ZD420 label printer, and my text file is coded in ZPL. The DOSPRN printed my file like I print from notepad, instead of changing the font, displaying the picture, etc. that should have print if it would have read the ZPL code properly.

Years ago, we had a similar Zebra label printer, and the same ZPL coded text files printed out properly when I typed this into a command prompt:
PRINT /D:LPT3 c:\temp\\ap008_1811301057X.txt

So I thought a similar command would work. But it seems this label printer does not respond the same way the older 230 model worked. And we do not have the older model any more.


Reply ↓  Report •

#8
July 15, 2019 at 11:07:56
Printing from command prompt might not be an option then for your current setup. While in windows can you use Word or software that will print the correct font and pictures?

Reply ↓  Report •

#9
July 15, 2019 at 11:12:35
There is a ZDesigner Direct Communication program that I can cut and paste into, and it prints fine from there. I am currently researching the manual to see if there is a way to call it and print using command prompt commands.

Reply ↓  Report •

#10
July 15, 2019 at 12:53:13
Good luck. It's too bad so much good but old software won't work with newer machines and OS's.

Reply ↓  Report •

Ask Question