list all files in sub directory 1 level below?
tcl
Solution
You only need one call to glob:
set tcl_files [glob */*.tcl]
Problem
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 * } ```