From: Alessandro A. <ant...@gm...> - 2008-07-15 16:22:02
|
Hi, Kevin. I know something about Unix scripts e a little bit more about Windows batch files. Unfortunately Microsoft if very lazy on this technique why they prefer JavaScript with a lot of classes and interfaces that you will never heard about. Ok, that said, I think that you are mistakenly removing the quotes in your command line inside the batch script. Enclosing the command line switches in quotes usually solves the problem. But, if you are still having trouble you can get the arguments separated and join them again inside the script. Like in: set SOME_VAR="-%1=%2,%3,%4" Them pass 'SOME_VAR' to whatever you want. Regards. 2008/7/15 Kevin Mack <kev...@us...>: > Hi all, > > sorry for the offtopic post... > > I've got a Unix program that is being converted over to Windows. On > Unix, a shell script is used to configure some environment settings and > then run the executable, passing the executable whatever options were > passed into the script. The command line options might take the form: > > -myoption=script,junk,output > > To complete the transition to a native Windows program, I want to use a > Windows batch script to perform the functions of the shell script: > > myprog.bat -myoption=script,junk,output > > To my surprise, I find that the command prompt will automatically break > this up into four separate arguments > > "-myoption", "script", "junk", and "output" > > I have tried double quoting it, but the command prompt doesn't like that > either. The argument is preserved, but gives an error message "=script > was unexpected at this time." > > Is there some option to disable this automatic processing of "," and "=" > characters? I am unable find any information on this idiosyncrasy of > the command prompt. > > Kevin > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > -- Alessandro Antonello |