Walk a directory/Recursively: Difference between revisions

→‎{{header|Tcl}}: Small improvements, formatting
(→‎{{header|Tcl}}: Small improvements, formatting)
Line 537:
 
=={{header|Tcl}}==
 
{{works with|Tcl|8.4}}
<lang tcl>proc walkin { fromDir pattern} {
foreach fname [glob -nocomplain -directory $fromDir *] {
if { [file isdirectory $fname] } {
walkin $fname $pattern
} elseif {[string match $pattern [file tail $fname]]} {
} else {
if {puts [stringfile match *.mp3normalize $fname] } {
} else {
puts [file normalize $fname]
}
}
}
# replace directory with something appropriate
}
walkin /home/user *.mp3</lang>
}
# replace directory with something appropriate
walkin /home/user
 
=={{header|Visual Basic .NET}}==
Anonymous user