Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

redirecting LPT1 to a file

444 views
Skip to first unread message

Michiel de Roo

unread,
Oct 26, 2000, 10:55:29 AM10/26/00
to
Hi,

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.

laura fairhead

unread,
Oct 26, 2000, 11:11:22 AM10/26/00
to

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

Tom Lavedas

unread,
Oct 26, 2000, 12:04:16 PM10/26/00
to

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/

0 new messages