Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open file

Status
Not open for further replies.

bebig

Technical User
Oct 21, 2004
111
US
set readFile [open "text.txt" "r"]

what if we don know what files will open,

do I need to know the path?
 
Oh yes!
If you don't specify an absolute directory path within the "open" cmd, then it will look on the current directory. Alternatively, you could set the dir path with the "cd" cmd prior to the open cmd.

Out of curiosity, are you executing your scripts with just Tcl or are you running with Tk? Tk provides widgets which give a nice user interface? (e.g. - tk_getOpenFile cmd)

...Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top