As
ulis pointed out, if you're going to be passing these path references to Tcl commands, you don't need to convert from "/" to "\". Here's what the Tcl
filename
reference page has to say on the subject:
"All Tcl commands and C procedures that take file names as arguments expect the file names to be in one of three forms, depending on the current platform. On each platform, Tcl supports file names in the standard forms(s) for that platform. In addition, on all platforms, Tcl supports a Unix-like syntax intended to provide a convenient way of constructing simple file names. However, scripts that are intended to be portable should not assume a particular form for file names. Instead, portable scripts must use the
file split and
file join commands to manipulate file names (see the
file
manual entry for more details)."
And for those instances where you really do need to convert to your platform's native version of a path (for example, displaying a path to a user, writing it into a file that might be read by other programs, etc.), use the
file nativename command.
- Ken Jones, President, ken@avia-training.com
Avia Training and Consulting,
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax