| |||||||||||
TCL question - accessing same-directory files Posted by dvorak_user (dvorak_user), 8 February 2008 Once again, I barely managed to fit in that topic title!For a while, I've tried to figure out how to access files in the same directory (in the context of multi-file programs), but I always get a "file does not exist" error unless the working directory is the same as the one that contains the files. Mainly, I would like to know how a script can either run scripts in its directory or obtain its absolute location. Thanks for your time! This should be an easy one to figure out, but I just haven't had any luck. Posted by admin (Graham Ellis), 8 February 2008 Add a "." to the appropriate path variable. Tcl has a number of predefined variable s and if you lappend a "." for current directory before you read the file ...Code:
This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |