lua-users home
lua-l archive

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

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