lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

"Robert Raschke" <> wrote:
> On 7/21/08, Xu Wang <> wrote:
> > > cmd1=[["C:\Program Files\TortoiseSVN\bin\subwcrev" .\ "addnb.v29.ace" "D:\ace\addnb.v29.ace"]]
> > > os.execute(cmd1)
> > 'C:\Program' is not recognized as an internal or external command,
> > operable program or batch file.
> > > cmd2=[["C:\Program Files\TortoiseSVN\bin\subwcrev" .\ addnb.v29.ace D:\ace\addnb.v29.ace]]
> > > os.execute(cmd2)
> > SubWCRev: 'D:\wangxu\WorkData\Kuwait_USR6_USR6.1\movie\'
> > Last committed at revision 18
> > Mixed revision range 17:18
> > >
> >
> > cmd1 is error but cmd2 can be executed sucessfully. why?
> Forgot to mention why cmd1 fails and cmd2 works. One of the rules in
> Windows is that if a command line starts and ends with a double-quote,
> they are removed before executing the result. That means your first
> command ends up getting the initial double-quote thrown away (as well
> as the last one), and then tries to execute C:\Program with several
> arguments.

Actually, this seems to be an artifact of CMD.EXE and not so much a rule
in Windows. (Rules in Windows? Wonder what that means anyway;-)

At least my command-line interpreter (the delectable JPSoft 4NT/Take
Command) as well as the Start menu Run... box execute both commands
above without problem. (Indeed, I'll take this opportunity to point
interested readers to the freeware version of the JPSoft CLI (called
TCC/LE) which beats CMD.EXE hands down in terms of features and

cheers  thomasl