[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug regarding os.execute?
- From: "Robert Raschke" <rtrlists@...>
- Date: Mon, 21 Jul 2008 10:00:51 +0100
On 7/21/08, Xu Wang <xu4wang@gmail.com> 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.
Robby