[comp.sys.ibm.pc] redirect lpt1: to file

crimmins@uiucuxc.cso.uiuc.edu (12/05/86)

/* Written 10:21 pm  Dec  3, 1986 by csc@riccb.UUCP in uiucuxc:comp.sys.ibm.pc */
>Can anyone out there in net land tell me how to redirect the line printer
>to a file.


Most print spooling programs allow you to halt output to the printer
and collect data in a buffer, which can be copied out to disk when
printing is complete.  The one I've seen work best is Print Buffer
On-Line, from IBM (maybe from their Personally Developed Series?).
If you need more info, let me know.

----
Dan Crimmins
University of Illinois at Urbana-Champaign
Computing Services Office - PC Consulting Dept.

BITNET:	crimmins@uiucuxc.bitnet
ARPA:	crimmins@uiucuxc.cso.uiuc.edu
CSNET:	crimmins@uiucuxc.csnet
UUCP:	{ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!crimmins
ICBM:	40 07 N / 88 13 W

mds7958@ritcv.UUCP (Mark Sicignano) (12/08/86)

     I have MS-DOS 3.1 and there is a program called xassign which will
do this.  I have used it like this.

xassign lpt1=filename

I don't have the manual right in front of me, but I think that is how
is is done

kneller@ucsfcgl.UUCP (Don Kneller%Langridge) (12/09/86)

>Can anyone out there in net land tell me how to redirect the line printer
>to a file.
>
I've used MSC 4.0 to redirect printer output to a file.  Since open
files are kept in child processes, I freopen() stdprn as a file, then
spawn a copy of command.com.  This copy has lpt1:  redirected to the
file.  You can do whatever you wish from DOS or an application that
uses DOS calls to write to lpt1:, and have the output show up in that
file.  After "exit"ing from the copy of command.com, fclose the file.
The DOS version was 2.0 and I haven't tried it under 3.1 yet.
-- 
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller@cgl.ucsf.edu
BITNET:	kneller@ucsfcgl.BITNET