Posted by Barbara Brazil on May 05, 2017 at 13:02:29:
In Reply to: Print a dos file to a Comet Printer posted by Yves Ste-Marie on April 28, 2017 at 12:37:34:
Printfile can be used to print file data into a single variable. If you want to print to a printer you have to use PRINT. What kind of data is in this DOS file? If it's a standard text file where each record is terminated with (CR)(LF) you could use InputFile to read the entire file into a dynamic string, then use PRINT to write it out to your printer. Since it's not a COMET file you'd use the "full path" version of InputFile rather than the version that uses a LUN.
length dynamic & local x$
x$ = inputfile("c:\comet\file.txt")
close (2) & open (2) "lph"
print (2) x$
Post a Followup