Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The code you were using is <em>almost</em> correct. You wanted this:</p> <pre><code>eval exec [auto_execok start] [list "" $folderpath] </code></pre> <p>That's because you needed that extra blank argument in there for <code>start</code> to consume (it's the “title” of the window to create, and is rather obscure if you're used to only feeding in relative filenames). This is a specific quirk of <code>start</code>, combined with how Tcl does the quoting of things being fed through the Windows process creation interface; what happens is that Tcl puts <code>"</code> chars round non-simple arguments (<em>almost</em> always the right thing to do) and that causes <code>start</code> to get confused and do the wrong thing, which leads to the error message. This is pretty horrible, but adding an extra empty argument defuses the problem.</p> <p>You might also need to convert that path into the native format if it isn't already:</p> <pre><code>eval exec [auto_execok start] [list "" [file nativename $folderpath]] </code></pre> <p>(How do you know if it is native? Check if the directory separator is <code>/</code> — the Tcl standard, also native on Unix and OSX — or <code>\</code> — which Windows uses.)</p> <p>In some cases, you may need <code>file attributes $folderpath -shortname</code> to work around problems. I hope you don't need that! (Hardly anything does these days, to be fair; it was only critical on pre-XP systems though it remains occasionally useful when dealing with very long paths.)</p> <hr> <h2>Compatibility Forms</h2> <p>You are encouraged to use the syntactic changes proposed by Glenn if you're using Tcl 8.5 (or later), as they're clearer, easier to use, and marginally faster too (not that the last matters much here; the speed difference will be just noise compared to the cost of starting a subprocess):</p> <pre><code>exec {*}[auto_execok start] "" [file nativename $folderpath] </code></pre> <p>If you're using 8.4 (elderly, but supported) or before (why!?) then use the form with <code>eval</code> forms above.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload