Discussion Locked

how to print to text file-dos program

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok please no laughing - i need to print the results of dos based program to a file , the print to file settings in windows will not work , i think i need a capture command that will redirect my print job to a text file instead of the print que (useing novell 3.12,
program runs from server,i'm almost positive it's possible i just can't remember) does anyone have an idea ?

5 replies

by some guy in seattle

add the characters "> " to the end of the DOS command. This will redirect the output of the command to a text file. For instance,

Dir c:\winnt > test.txt

will direct the content listing of the winnt directory to a file called test.txt created in your current directory.

A double arrow (>>) will append the data to an existing text file rather than overwrite it.

Hope that helps,

by vinnyd

What you want to do is use a batch file to capture the printer port and have the capture command in 3.12 create a disk file and then end the capture when the program is exited.

capture lpt1 /cr=f:\logfile.txt
runprogram
endcapture

For more help this is the capture command options in Novell 3.12

F:\PUBLIC>capture /?
USAGE: CAPTURE /SHow /Job=jobname /Server=fileserver /Queue=queuename /Local=n
/Form=form or n /CReate=path /Copies=n (1-255) /TImeout=n /Keep /Tabs=n (1-18)
/No Tabs /Banner=bannername /NAMe=name /No Banner /FormFeed /No FormFeed
/AUtoendcap /No Autoend /NOTIfy /No NOTIfy /DOmain=domain
/EndCapture /CAncel /ALL

by paul.a.wisniewski

this is what i need but for someother reason it won't create the file ??? but you've pointed me in the right direction thanks

This discussion is closed to new replies.