Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP (Don Kneller%Langridge) Newsgroups: comp.sys.ibm.pc Subject: Re: redirect lpt1: to file Message-ID: <9960@cgl.ucsf.edu.ucsfcgl.UUCP> Date: Mon, 8-Dec-86 16:39:25 EST Article-I.D.: cgl.9960 Posted: Mon Dec 8 16:39:25 1986 Date-Received: Mon, 8-Dec-86 21:46:28 EST References: <832@riccb.UUCP> <174200007@uiucuxc> Reply-To: kneller@cgl.ucsf.edu.UUCP (Don Kneller) Organization: Computer Graphics Laboratory, UCSF Lines: 15 >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