Anonymous
public text v1 · immutableproc findDirs { path pattern matchDirs} {
set curDirs ""
catch {set curDirs [glob -type d -directory $path *]}
if { [llength $curDirs] == 0 } {
return $matchDirs
} else {
foreach dir $curDirs {
if { [regexp $pattern $dir] } {
lappend matchDirs $dir
}
lappend matchDirs [findDirs $dir $pattern $matchDirs]
return $matchDirs
}
}
}
set toto [findDirs /monpath/Pack1 .*ru.* ""]
puts $toto