From: pjfarley AT dorsai DOT org (Peter J. Farley III) Newsgroups: comp.os.msdos.djgpp Subject: Re: Making system calls in DJGPP??? Date: Sun, 08 Jun 1997 05:51:32 GMT Organization: The Dorsai Embassy, Inc. Lines: 23 Message-ID: <339a45f6.303643@news.dorsai.org> References: <3399f7f4 DOT 78421722 AT supernews DOT scsn DOT net> NNTP-Posting-Host: pjfarley.ppp1.dorsai.org To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk ckeenan AT scsn DOT net (Chris) wrote: >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)