I am trying to list all of the *.tcl files that's exactly 1 level below. Such as
./dirA/x.tcl
./dirB/y.tcl
./dirC/z.tcl
I am using foreach
command to list all files & directories under the sub directory, but the output is empty..
foreach dir [glob -type d *] {
glob -path ./$dir *
}
You only need one call to glob:
set tcl_files [glob */*.tcl]
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments