The PATH environment variable is used by the OS when exec calls are made. Tcl invokes exec during both the [exec] command, as well as the [open] ''pipe'' style call. If you specify a full pathname for the command in either of these cases, exec directly invokes the command. Otherwise, the system call works as documented for your system, which is typically to walk through the path, a directory at a time, reading through the directory until a '''suitable''' (defined by the OS) file is located for execution. ---- [LV] example of some code to read through $PATH, looking for all the places a command might be found: set cmd $::argv set dirlst [split $::env(PATH) ":"] foreach dir $dirlst { set tstfile [file join $dir $cmd] if {[file exists $tstfile]} { puts "$tstfile exists" } } I need to test the above to see if it works with files that contain special characters, like space. ---- [Tcl syntax help] | [Category Glossary]