Exec a program on Windows that contains ( ) in the filename
- From: joiosoy@xxxxxxxxx
- Date: 22 Sep 2006 11:26:36 -0700
Hi,
Have been banging my head on this. I have not found a way of executing
a file that has parentheses in its name on Windows.
Say the file is "test.bat" and it lives in "c:\Tcl\bin\a(b)". It
contains: echo Hello
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.
set f [open |c:/Tcl/bin/a(b)/test.bat] ; close $f
'c:\Tcl\bin\a' is not recognized as an internal or external command,
operable program or batch file.
set f [open |"c:/Tcl/bin/a(b)/test.bat"]; close $f
'c:\Tcl\bin\a' is not recognized as an internal or external command,
operable program or batch file.
exec {"c:/Tcl/bin/a(b)/test.bat"}
couldn't execute ""c:\Tcl\bin\a(b)\test.bat"": no such file or
directory
The weirdest of all:
cd c:/Tcl/bin/a(b)/
exec 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
Any ideas? I am going crazy over this. This comes in part from people
installing programs on c:\Program Files (x64) on 64bit versions of
Windows
Thanks in advance for any insight you can provide
Daniel
.
- Follow-Ups:
- Re: Exec a program on Windows that contains ( ) in the filename
- From: walton . paul
- Re: Exec a program on Windows that contains ( ) in the filename
- From: Robert Hicks
- Re: Exec a program on Windows that contains ( ) in the filename
- From: Benjamin Riefenstahl
- Re: Exec a program on Windows that contains ( ) in the filename
- From: Synic
- Re: Exec a program on Windows that contains ( ) in the filename
- From: Ralf Fassel
- Re: Exec a program on Windows that contains ( ) in the filename
- Prev by Date: Re: extra character error
- Next by Date: Re: Exec a program on Windows that contains ( ) in the filename
- Previous by thread: Event at specific time
- Next by thread: Re: Exec a program on Windows that contains ( ) in the filename
- Index(es):
Relevant Pages
|