Window batch : LPR command not work


I have quit a no. (around 150 daily) of system generated text files that need to print to a network printer.  I try to automate this one via a batch job by using LPR (Print command seems not work for network printers) but it constantly saying that either the server or the printer is not find.  Actually, the network printer is the (one and only one printer) default printer for that machine and its name as appear in Start->Control Panel->Printer is 4200_PRT2 on HKPDC (IP:  I do tried to use server name as well as IP address but seems not work either.  The line of LPR command is as follow :

lpr -S -P 4200_PRT2 -J Daily_Log D:\Temp\20060830client.txt

Can anyone help me on this ?  Thanks!

Who is Participating?
sirbountyConnect With a Mentor Commented:
What is the error you're seeing?
what about

copy D:\Temp\20060830.client.txt \\

or, if not what about without the -J

lpr -S -P 4200_PRT2 D:\Temp\20060830client.txt

StanleyLMWAuthor Commented:

Still not work ...

Since this is a server (Window 2000), not a workstation, most IP addresses and port are blocked by firewall.  Now the only available network printer on that server is using RAW (port 9100) to print and the ip address of the printer is  If I do send to print manually, it works fine.  Yet, if I use either LPR and/or DOS Print, both will not work..  I do tried to change it from RAW to LPR, but after that, manual print failed as well.

Are there any way for me to batch print via RAW ?

None that I know of, though I'm certainly no guru in that arena...did you try the copy command above?  I think it may hang on a pending line feed, but if that's the problem, I believe there's an easy way around that..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.