I have this problem:
We have an old DOS program which sends some information to the
printer. However, I would like to send it to a file instead. Is there
any way to do this, like with redirection in the opposite way.
Thanks, Michiel.
FTP SITE
ftp.simtel.net
PATH
/pub/simtelnet/msdos/printer
A SAMPLE OF THE DIRECTORY
lpt2dsk.zip B 6866 861002 Capture LPT output to a disk file
lptcom02.zip B 7298 880418 Redirect LPT to COM2
lptx600.zip B 20170 870317 Redirect printer output to a file
lptx700.zip B 30483 871018 Updated LPT (redirect PRN to file) .ASM src]
prn2fil3.zip B 14311 960709 Direct printer to a file, with sound, /src
prn2file.zip B 9845 871215 Redirect printer to disk (w/asm)
prndsk.zip B 17810 870302 Redirect Printer Output To Disk
prtdr803.zip B 34412 920813 COM/LPT port redir. to any other port or file
prtsc1.zip B 5085 870414 Enhanced PrtSc replacement, sets print sizes
pstash20.zip B 2543 890214 Redirects lpt output to file
prindir9.zip B 29845 960630 COM/LPT port redir. to any other port or file
See Ya,
L
I have also had some luck using the Windows spool file as a means of
trapping such text. I just 'Pause' the printer that is connected to the
LPT1 port with spooling enabled, run the DOS program, copy the *.spl
file out of the hidden Windows\spool\Printers folder, purge the document
from the printer queue and then release the printer again. It's a bit
laborious, but requires no external utilities. The copy part can be
automated to ease the process a bit, e.g. ...
@echo off
dosprog.exe
copy %Windir%\spool\Printers\*.spl d:\somewhere\outfile.txt > nul
Pausing, purging and releasing the printer must still be done
manually. But, if you don't do it very often, it might be useful.
Tom Lavedas
-----------
http://www.pressroom.com/~tglbatch/