🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.tcl
Article #74

Re: something wrong with special char in "exec exploer.exe" command

#74
From: meshparts
Date: Tue, 20 Oct 2026 06:52
26 lines
2248 bytes
Am 20.10.2026 um 08:36 schrieb et99:
> Hi:
> 
> In cmd.exe, = (like , and ;) acts as an argument delimiter, the same as 
> a space, unless it is inside double quotes. So an unquoted t=4.out can 
> be split into t and 4.out. Tcl's exec only quotes arguments containing 
> whitespace, a double quote, or one of & | ^ < > ! ( ). The = sign isn't 
> on that list, so t=4.out reaches the command line unquoted and gets 
> mangled, and the quotes in your script are eaten by Tcl's parser.
> 
> Skip explorer and use start with an empty title:
> 
> exec cmd /c start "" [file nativename $path] &
> 
> The "" matters: start treats its first argument, if quoted as the window 
> title, so without it a quoted path (for example one with spaces) can be 
> taken as the title instead of the file. Tcl passes the empty argument 
> through as "", so start gets a real (empty) title and opens the path 
> with the default program.
> 
> -e
> 
Thank you! This is very important thing to know.
So now I have the cmd and the twapi methods that seems to work fine.
Still, which one should I use?
Are there any other hidden traps that will crash either one?
Technical Details
Message-ID: <11b733k$28p7$1@tota-refugium.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
References: <11b5rl3$1fbh$1@tota-refugium.de> <11b724k$2ok9e$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: meshparts <alexandru.dadalau@meshparts.de>
Newsgroups: comp.lang.tcl
Subject: Re: something wrong with special char in "exec exploer.exe" command
Date: Tue, 20 Oct 2026 08:52:35 +0200
Message-ID: <11b733k$28p7$1@tota-refugium.de>
References: <11b5rl3$1fbh$1@tota-refugium.de> <11b724k$2ok9e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 20 Oct 2026 06:52:36 -0000 (UTC)
Injection-Info: tota-refugium.de;
	logging-data="74535"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:rUpq3BuMbSBIjQxYF7o8aAHkDAA=
X-User-ID: eJwFwYEBwDAEBMCVSvlnHAn2HyF3/kNwaXCYr28tiNY65PKmnM3poqt0fiHqXTEqDJ0lrB8qGxFH
In-Reply-To: <11b724k$2ok9e$1@dont-email.me>