#274 The glob command in tcl

glob command returns the names of the files that match a pattern.

set files [glob *.tcl]
foreach file $files {
    puts $file
}

Output:

ex274.tcl