copy lpt1 w/ WSH 
Author Message
 copy lpt1 w/ WSH

Hello all,
I would like to be able to create a script that will copy a plot or print
file (plt or prn) to a shared printer on the network (i.e
\\printserver\printer), and perhaps even to a port (i.e. LPT1). However, I
have been unable to find a way to copy a file to either a printer or a port.
Can anyone point me in the right direction.

Gordon Price

Fri, 24 Aug 2001 03:00:00 GMT  
 copy lpt1 w/ WSH
This works for me.

Set WshShell=CreateObject("Wscript.Shell")
WshShell.Run " /c copy d:\path\file.txt lpt1",0,true
Set WshShell=nothing


David E. Stockbridge
Notepad Construction Company

Sat, 25 Aug 2001 03:00:00 GMT  
 copy lpt1 w/ WSH


>This works for me.

>Set WshShell=CreateObject("Wscript.Shell")
>WshShell.Run " /c copy d:\path\file.txt lpt1",0,true
>Set WshShell=nothing

Duh!!! That should have been right in front of my nose, but I was looking
the wrong way!! I guess I was trying to do everything with pure WSH object
model. BTW, via another source I found a link to some code for VB that will
send a file to a printer defined in windows. I may try to make a VB dll that
could be run from WSH, but your approach will allow me to do what I have
been trying to do for some time.

Thanks again!


Sun, 26 Aug 2001 03:00:00 GMT  
 [ 3 post ] 

 Relevant Pages 

1. copy to LPT1 via WSH

2. copy .ps lpt1

3. printing by copying to LPT1:?

4. Copy a Print File to LPT1:

5. LPT1: Capture Program

6. Intercepting data to lpt1:

7. Need to send output to LPT1 to another printer

8. Detect LPT1 connection

9. Detect default printer on local LPT1 via VB script

10. Using Vbscript to output data to LPT1

11. Wanted: Redirect LPT1 to .PS file

12. How to copy a file in WSH?


Powered by phpBB® Forum Software