Solved

Window batch : LPR command not work

Posted on 2007-03-21
3
1,157 Views
Last Modified: 2008-02-01
Hi,

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:10.52.3.10).  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 10.52.3.10 -P 4200_PRT2 -J Daily_Log D:\Temp\20060830client.txt

Can anyone help me on this ?  Thanks!

Cheers
Stanley
0
Comment
Question by:StanleyLMW
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
Comment Utility
What is the error you're seeing?
what about

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

or, if not what about without the -J

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




0
 

Author Comment

by:StanleyLMW
Comment Utility
Hi,

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 10.52.3.57.  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 ?

Cheers
Stanley
0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
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..
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
windows 2000 3 420
Robocopy - migrate user shares access denied 6 1,490
Recreate New ADC 1 270
Remote Desktop Software 6 439
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now