Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to redirect the output to a network printer

Status
Not open for further replies.

PleaseGiveHelp

Programmer
Oct 29, 2002
131
US
I have created an executable which prints out a report (well updates) every 5 minutes. However, I do not want the output to print out at the default printer. I want it to print out on a network printer (NOT default). Is this posible to do within the .bat script?
 
Hi,
Since this is the UNIX scripting forum I take it this is a job running on a UNIX server and not a WINDOWS server although the use of the term .BAT script makes me wonder.

Anyway most UNIX systems require you to use

lpr

to output information to the printer and lpr has a

-P <name>

option where you can specify the <name> of the printer you want to send it to.

By default if you don't specify the -P your output is sent to the printer defined in the $PRINTER environment variable.

---
 
And when using lp it is -d (destination) like:
lp -d<mynetworkprinter>
 
Shoot no, I actually need NT or Windows scripting...my bad. Unfortunately Tek-Tips does not have a forum for what I need. Does anyone know where I might such information?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top