how to redirect lpt1 to file-output 
Author Message
 how to redirect lpt1 to file-output

I have an "old" clipper program which allways prints to lpt1. How can
I redirect this to a file-output under Windows NT?


Tue, 19 Apr 2005 21:10:00 GMT  
 how to redirect lpt1 to file-output

Hi,
when you have the sourcecode, then just change the "SET PRINTER
TO"-command to "SET PRINTER TO filename.txt" (.prn=default).

If .not. ;-)
then you should try to find a programm that does this, or just set the
printersettings to "PRINT TO FILE".

hth

harald

--
Posted via http://dbforums.com



Wed, 20 Apr 2005 06:54:28 GMT  
 how to redirect lpt1 to file-output
BongoPlayEr),

Quote:
>I have an "old" clipper program which allways prints to lpt1. How can
>I redirect this to a file-output under Windows NT?

For short term (troubleshooting) use, open Control Panel -> Printers
-> The printer in question. Change the port settings from the LPT port
to FILE. Then share the printer under a "well-behaved" name and NET
USE it as LPT1: just like with any other network printer. Now, when
the application prints to LPT1, a popup window will ask for the path
and name of the file.

For long term use, and assuming that you don't have access to the code
so you can change it, you need to find some kind of spooler utility
that will allow you print to file without asking questions every time.
Try searching the web or one of the download archives for such a
utility.

If, on the other hand, you do have access to the source code, I would
suggest that you move all your "set printer to lpt1:" to a UDF called
for example SetPrinter(). Then you call that function with
SetPrinter("report") and SetPrinter("invoice") etc and add whatever
bells and whistles you need in one single place: Print to file, print
to different ports etc. This will give you a lot of flexibility.

HTH,
Klas

-------
klas dot engwall at engwall dot com




Wed, 20 Apr 2005 08:45:32 GMT  
 how to redirect lpt1 to file-output
in the old dos tools, there are freeware/shareware to capture printer
port output into files. check simtel.net or oasis

Quote:

> Hi,
> when you have the sourcecode, then just change the "SET PRINTER
> TO"-command to "SET PRINTER TO filename.txt" (.prn=default).

> If .not. ;-)
> then you should try to find a programm that does this, or just set the
> printersettings to "PRINT TO FILE".

> hth

> harald

> --
> Posted via http://dbforums.com

--
  .~.    Swiftly. Silently. Invisibly. In Linux we trust.

/( _ )\  http://www.linux-sxs.org
  ^ ^    2.4.19 7:45am up 8 days, 11:25, 0 users, load average: 0.00,
0.00, 0.00


Wed, 20 Apr 2005 08:41:23 GMT  
 how to redirect lpt1 to file-output
do a Google search for: Prn2File
there is a PRN2FILE.COM size 1386 bytes(!) from Ziff Communication
(PC Mag)

  Chen.



Thu, 21 Apr 2005 14:37:01 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Redirecting Output to files

2. Redirecting to TWO output files

3. Redirecting program output to file

4. redirect g77 output into a file under windows xp

5. redirect output of functions to a string or file

6. Redirect file output into variables

7. redirect g77 under DOS 6.22- need output file

8. expect: redirect output into file called `uname -n'.txt

9. redirect exec output to a file

10. Redirecting output to a scratch file

11. Redirecting output to file with elisp

12. Redirecting TCL script output to a file

 

 
Powered by phpBB® Forum Software