Posted to tcl by kostix at Sun Nov 09 00:23:23 GMT 2008view raw
- proc scan_dir {dirname pattern} {
- set out [list]
- foreach d [glob -type d -nocomplain -dir $dirname *] {
- set out [concat $out [scan_dir $d $pattern]]
- }
- concat $out [glob -type f -nocomplain -dir $dirname $pattern]
- }
- puts [scan_dir ~ *oo*]