Mail Archives: djgpp/1997/06/09/06:02:39
ckeenan AT scsn DOT net (Chris) wrote:
<Snipped>
>How can I get it to run
>
>system("program.bat");
>
>where program.bat is simply program.exe -1 -2??
Chris,
I think that you have to run the .BAT-file interpreter, COMMAND.COM,
to do that. Try this:
system("c:\\command.com /c program.bat");
"c:\\command.com /c" will run the .BAT file for you, which will run
program.exe -1 -2 for you. Note, you need the "\\" to generate a real
"\" in the contents of the string. Otherwise, you get a warning about
"unknown escape sequence \c" whan you compile it, and it won't do what
you think it should do.
----------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org)
- Raw text -