Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8490211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:03:10+00:00 2026-06-10T22:03:10+00:00

I am trying to open a folder from tcl/tk using the below command eval

  • 0

I am trying to open a folder from tcl/tk using the below command

eval exec [auto_execok start] [list $folderpath]

it gives me error on syntax is incorrect.

in the tclsh command prompt when I tried
start $folderpath the folder opens.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:03:12+00:00Added an answer on June 10, 2026 at 10:03 pm

    The code you were using is almost correct. You wanted this:

    eval exec [auto_execok start] [list "" $folderpath]
    

    That’s because you needed that extra blank argument in there for start 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 start, combined with how Tcl does the quoting of things being fed through the Windows process creation interface; what happens is that Tcl puts " chars round non-simple arguments (almost always the right thing to do) and that causes start 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.

    You might also need to convert that path into the native format if it isn’t already:

    eval exec [auto_execok start] [list "" [file nativename $folderpath]]
    

    (How do you know if it is native? Check if the directory separator is / — the Tcl standard, also native on Unix and OSX — or \ — which Windows uses.)

    In some cases, you may need file attributes $folderpath -shortname 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.)


    Compatibility Forms

    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):

    exec {*}[auto_execok start] "" [file nativename $folderpath]
    

    If you’re using 8.4 (elderly, but supported) or before (why!?) then use the form with eval forms above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to open a PPTX from a specific folder using a Function within
I'm trying to open a file using MacVim 7.3 (53) from the command line
I'm trying to open a JSON file from the assets folder with an InputStream
I am trying to run the iis-express command tool from a folder : iis-express
i'm trying to pass on sdcard a pdf from my raw folder to open
I am trying to execute a command from php script using php exe function.
I'm trying to open a folder from a distant server. I wrote : if
I am trying open a new window using url.Action. And the new Window url
I´m trying to open a tab using jquery, here is my code: $(#ecContenedorFolders).tabs({ tabTemplate:
I'm trying to open a zip file with jython using FileInputStream and ZipInputStream. But

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.