1.

Solve : Print to File?

Answer»

I have a DOS program that PRINTS to an Epson Dot Matrix Printer. Isn't there a DOS COMMAND that I can run before running the program to redirect the output from a printer to a PRN file?

Thanks,

MarkMy printer's not working right, but this should work:

PRINT [filename] > [filename2].TXT

Just try that, and let me know.
You might be thinking of the mode command but I think that was only to redirect print output to a serial COM device (EX. modem).

You might want to try this however:

yourprogram > filename.ext

Hope this helps. Thanks Guys,

I found PRN2FILE.COM whch works closest to anything as it redirects the data from LPT! to PRN. However I haven't been able to get the right file string put together that will write the file. Any suggestions?

Thanks,

MarkQuote

You might want to try this however:

yourprogram > filename.ext


That command will redirect the output of your program to a file. If you want to print the printfile then

PRINT filename.ext

PRN is a parallel port device not a file. Is your Epson a serial printer? If so you can redirect it to COM1 with the MODE command: MODE LPT1:=COM1:

Hope this helps. The following works:

PRN2FILE [filename] [#] [/S] [/X]
where
filename - name of file to save captured data (default: c:\prnspl)
#n - number of LPT (default: #1)
/S - CONVENTIONAL memory buffer size in bytes (default: /S4096)
/X - XMS buffer size in Kbytes (default: /X200)


Thanks,

Mark


Discussion

No Comment Found