Hello!
When searching the "recursive glob"-search here in the forum, I found:
proc recursiveGlob {pattern {dir ./}} {
set files [glob -nocomplain -types f -dir $dir $pattern]
foreach d [glob -nocomplain -types d -dir $dir *] {
set files [concat $files [recursiveGlob $pattern $d]]
}
set files
}
Yes, it DOES look nice, but how do I "start" this one? How do I have to pass the params "pattern" and "dir" to the proces (the "pattern {dir ./}" is too much for me).
And what is the output, when it has finished searching everything? Does it write everything to var "files"?
The proc is called with a mask to match against filenames and an optional starting directory. It returns a list of files matching your pattern in the given directory and all its sub directories.
Or may it be, the proc doesn't "like" folders containing spaces?
It managed to search to "Bob Marley and the Wailers" but didn't search this one! Can you fix that?