How can I copy a print file to a networked printer?

I have an Epson TM-T88V network printer. I can print to it using the printer driver. But I need to copy a "print file" to the printer using the command line, and this causes problems.

I cannot use

copy file.prn {ip-address}

Because this will simply copy the file to a new file with the name of the ip address.

I have seen various suggestions... that do not seem to work:

copy file.prn \\{ip-address}

The specified path is invalid

This one too failed me:

NET USE LPT1: \\{ip-address}\{printer-name}

System error 66 has occurred.

The network resource type is not correct.

Trying to ftp the file over failed, too. (Could not open a connection.)

Any ideas how to go about this?

7 Answers

Use Microsoft's lpr client

C:\>lpr /?
Sends a print job to a network printer
Usage: lpr -S server -P printer [-C class] [-J job] [-o option] [-x] [-d] filename
Options: -S server Name or ipaddress of the host providing lpd service -P printer Name of the print queue -C class Job classification for use on the burst page -J job Job name to print on the burst page -o option Indicates type of the file (by default assumes a text file) Use "-o l" for binary (e.g. postscript) files -x Compatibility with SunOS 4.1.x and prior -d Send data file first

This works with JetDirect and similar boxes/adapters as well as Unix/Linux and Windows servers that have the LPD service enabled.

1

From the command prompt:

copy filename \\Server Name\\{Printer Share Name}

If there is a space with the print share name be sure to enclose in quotes. For example:

copy filename "\\{Server Name}\\{Printer Share Name}"

lpr works great on Win 7 and up. You do not need to copy it. In Control Panel, go to "turn windows features on or off" and make sure "print and document services" are installed.

To use lpr to send a file to printer that uses the RAW protocol, the syntax is:

lpr -S <printer name or IP> -P raw <file to send>
e.g.
lpr -S 192.168.11.118 -P raw postscript.ps

enter image description here

2

Try sharing the local printer connection and then connect it to LPT1

NET USE LPT1: \\localhost\printer
3

Just share the folder c:\windows\system32\spool\printers in which the shared printer is connected for everyone with full control both in share and security menu. That will work fine.

1
copy /b file.prn \\Server\PrinterName

i just tested and it works for me

0

After lot of searching, if you want to print over network or local.

  1. Make sure the printer is shared.

  2. Print:

a. to network:

For example:

COPY out.ps "\\192.168.11.12\\HP LaserJet"

b. to local printer:

COPY out.ps "\\localhost\\CutePDF Writer"
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like