To: djgpp AT delorie DOT com, jfs10 AT psu DOT edu Date: Sat, 12 Apr 1997 16:48:55 -0700 Subject: Re: system() with command line options Message-ID: <19970412.165101.8606.3.bshadwick@juno.com> From: bshadwick AT juno DOT com (Ben N Shadwick) >I have a program that will need to run another program with some >options. The program line looks like success=system(test.exe -d c:\junk\); . >Where test is a self extracting archive. I am using rsxntdj djgpp v2 on >a win95 machine. When this line is executed I get bad command or file name. >Running test.exe on its own works perfectly. Does anyone know what I am doing wrong? >I have looked thru the FAQ. My command line is under 126 characters, so I don't >think this is the problem. Any help would be great. Try using forward slashes '/' instead of backslashes '\'. If that doesnt work, try double backslashes "\\". C uses backslashes as part of escape codes ("\n" etc.), so it's a little sensitive to them. Also, it may be a unix thing too, since it uses forward slashes instead of backslashes like DOS does. ====== Ben Shadwick, Sysop, Mars Base BBS (360)882-0773, Vancouver, WA, USA email: bshadwick AT juno DOT com "I am now telling the computer EXACTLY what it can do with a lifetime supply of chocolate!!!"