Copying a print file to a network computer.

  • Thread starter Thread starter Sid Elbow
  • Start date Start date
S

Sid Elbow

I've been sending a print file (.prn) to a local, parallel-port printer
by simply copying the file to LPT1 via a batch file.

I now want to send the same file to a printer which is attached to the
network via a print server. How can I do that in a batch file? The
print-server has an IP of 192.168.0.110 and the printer is on port # 9101.
 
Sid Elbow said:
I've been sending a print file (.prn) to a local, parallel-port printer by
simply copying the file to LPT1 via a batch file.

I now want to send the same file to a printer which is attached to the
network via a print server. How can I do that in a batch file? The
print-server has an IP of 192.168.0.110 and the printer is on port # 9101.

Share the printer, then connect it to a printer port with
this command:
net use LPT2: \\%ComputerName%\SharedPrinter
 
Pegasus said:
Share the printer, then connect it to a printer port with
this command:
net use LPT2: \\%ComputerName%\SharedPrinter

OK, thanks. I assume that %ComputerName% in this case is the network
name for the print-server?
 
Pegasus said:
Share the printer, then connect it to a printer port with
this command:
net use LPT2: \\%ComputerName%\SharedPrinter

OK, I believe I have it correctly ... however, it isn't letting me copy
the print file. Here's a copy of the command window dialogue - the batch
file has the echo on so you can see what's happening. The print file
does exist in the local directory and is a tested file. LPT2: likewise
seems to exist OK.

(---- batch file run ----)
C:\1280>varcol

C:\1280>net use LPT2: \\PS-5A786A\PS-5A786A-U2
The command completed successfully.


C:\1280>copy /b varcol-e.prn LPT2:
"LPT2:" is not a recognized device.
The system cannot find the file specified.

(---- query LPT2: -----)

C:\1280>net use lpt2:
Local name LPT2
Remote name \\PS-5A786A\PS-5A786A-U2
Resource type Print
Status OK
# Opens 0
# Connections 1
The command completed successfully.


( ---- dir listing -----)

C:\1280>dir
Volume in drive C is Win2K-Main
Volume Serial Number is 1447-EAD7

Directory of C:\1280

04/15/2008 07:59p <DIR> .
04/15/2008 07:59p <DIR> ..
04/14/2008 05:41p 107,783 varcol-e.prn
04/15/2008 08:00p 68 varcol.bat
2 File(s) 107,851 bytes
2 Dir(s) 10,876,964,864 bytes free
 
Sid said:
OK, I believe I have it correctly ... however, it isn't letting me copy
the print file. Here's a copy of the command window dialogue - the batch
file has the echo on so you can see what's happening. The print file
does exist in the local directory and is a tested file. LPT2: likewise
seems to exist OK.

(I do realise I'm replying to my own posts :-)

I think I found a solution:

C:\1280>copy varcol-e.prn \\PS-5A786A\PS-5A786A-U2
1 file(s) copied.
 
Sid Elbow said:
(I do realise I'm replying to my own posts :-)

I think I found a solution:

C:\1280>copy varcol-e.prn \\PS-5A786A\PS-5A786A-U2
1 file(s) copied.

Thanks for letting us in on your soliloquy!!
 
Back
Top