How to execute "Type <filename> > prn"

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

How to execute "Type <filename> > prn"

Post 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
With best regards,
Sudip
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

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

Post 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
Regards,

Danny
Manila, Philippines
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

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

Post by sudip »

Hi Danny,

Thanks a lot!!! It works :D

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

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

Post by Rathinagiri »

Interesting to know. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply