Anonymous user
Walk a directory/Recursively: Difference between revisions
m
→{{header|LiveCode}}
Line 1,122:
=={{header|LiveCode}}==
set the defaultFolder to dir
▲<lang LiveCode>function listfiles d, ext
if fileExt(fi) = ext then
▲ repeat for each line fd in fileDirList
if the number of lines of tmp > 0 then▼
end repeat▼
end if
end repeat
repeat for each line di in the folders
filter filelist without empty▼
return filelist▼
put recurDir((dir & slash & di), ext) & cr after fileList
end if▼
end recurDir
function
set the
▲ end if
▲end dirwalk</lang>
Example
<lang LiveCode>put
Output
<pre>... /Users/xxx/music/albumx/trackx.mp3
|