It could be done this way too : set idir [file root [file tail $out]].vfs if {![file exists $idir] || ![file isdirectory $idir]} { set idir [file tail $out].vfs } I think this wouldn't break anything. -- David Zolli - Kroc http://www.kroc.tk