Re: Exec a program on Windows that contains ( ) in the filename
- From: Benjamin Riefenstahl <b.riefenstahl@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 23 Sep 2006 17:18:03 +0200
Hi Daniel,
Daniel writes:
exec c:/Tcl/bin/a\(b\)/test.bat
'c:\Tcl\bin\a' is not recognized as an internal or external command,
operable program or batch file.
[...]
From the Windows command line:
C:\Documents and Settings\user\Desktop>c:\Tcl\bin\a(b)\test.bat
'c:\Tcl\bin\a' is not recognized as an internal or external command,
operable program or batch file.
But if we quote it:
C:\Documents and Settings\user\Desktop>"c:\Tcl\bin\a(b)\test.bat"
C:\Documents and Settings\user\Desktop>echo Hello
Hello
In a previous discussion Cameron Laird suggested to use [exec <<] as
in:
exec $::env(COMSPEC) << {"c:\Tcl\bin\a(b)\test.bat"}
Of course in real applications you want to construct the string
dynamically. The main point is that if you can make CMD.EXE do what
you want, than you can use that facility from Tcl by piping the exact
syntax into CMD.EXE.
benny
.
- References:
- Prev by Date: Re: does anyone care about iwidget bug reports?
- Next by Date: Re: Exec a program on Windows that contains ( ) in the filename
- Previous by thread: Re: Exec a program on Windows that contains ( ) in the filename
- Next by thread: Re: Exec a program on Windows that contains ( ) in the filename
- Index(es):
Relevant Pages
|