Page 1 of 1

How to execute "Type <filename> > prn"

Posted: Thu Jul 09, 2009 5:17 am
by sudip
Hi All,

How to execute TYPE <FILENAME> > PRN (This is required for dumping some .txt file into specific old barcode printer)

BTW, I tried with EXECUTE command, but may be due to some syntactical error I couldn't do it.

I tried with the command,
EXECUTE OPERATION "EDIT <FILENAME>"
and
EXECUTE FILE "EDIT <FILENAME>" WAIT

But following command runs ok
EXECUTE FILE "NOTEPAD.EXE <FILENAME>" WAIT

Thanks in advance.

With best regards.

Sudip

Re: How to execute "Type <filename> > prn"

Posted: Thu Jul 09, 2009 5:46 am
by dhaine_adp
How to execute TYPE <FILENAME> > PRN (This is required for dumping some .txt file into specific old barcode printer)
Hi Sudip,

Have you tried something like this:

Code: Select all

function DumpFile( cFile )

PRIVATE cDosCommand := ""

cDosCommand :=  "/c TYPE " + cFile + " > PRN"
EXECUTE FILE "CMD.EXE" PARAMETERS cDosCommand HIDE

RETURN NIL
For more info about cmd.exe help go to console (command prompt) and type cmd /?

I hope that helps (but I didn't test that piece of code I posted, it's just merely a suggestion).

Regards,

Danny

Re: How to execute "Type <filename> > prn"

Posted: Thu Jul 09, 2009 5:53 am
by sudip
Hi Danny,

Thanks a lot!!! It works :D

With best regards.

Sudip

Re: How to execute "Type <filename> > prn"

Posted: Thu Jul 09, 2009 6:12 am
by Rathinagiri
Interesting to know. :)