[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bug regarding os.execute?
- From: Thomas Lauer <thomas.lauer@...>
- Date: Mon, 21 Jul 2008 10:26:11 +0100
"Robert Raschke" <email@example.com> wrote:
> On 7/21/08, Xu Wang <firstname.lastname@example.org> 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
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