auto_execok is one of several commands documented at http://www.purl.org/tcl/home/man/tcl8.4/TclCmd/library.htm
Canonical example usage:
eval exec [auto_execok dir] *.$suffix
[Explain why this is better than $::env(COMSPEC), cmd.exe, ...]
Tcl syntax help - Arts and crafts of Tcl-Tk programming - Category Command
_____________________________