Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as Java by n ( 12 years ago )
proc listTree {rootdir_} {
set currentnodes [glob -nocomplain -directory $rootdir_ -type d *]
if {[llength $currentnodes] <= 0} {
# aktualny katalog jest lisciem i posiada pliki to wypisz te pliki
set fileslastnode [glob -nocomplain -directory $rootdir_ -type f *]
if {[llength $fileslastnode] > 0} {
foreach eachfile $fileslastnode {
puts "$eachfile"
}
}
return
} else {
# Rekursywnie przegladaj wszystkie katalogi
foreach node $currentnodes {
listTree $node
}
}
}
Revise this Paste
Parent: 15609