Sivakatirswami wrote:
I'm using an old Ken Ray stand by for directory walks. I discovered
a "bug" here where, if the folder name begins with a space, it is
skipped. I cannot for the life of me figure out why...
on directoryWalk whatFolder
set the itemDel to "/"
set the directory to whatFolder
put the files into tFiles
put the files into temp
add the number of lines of temp to tCount
sort temp
repeat for each line x in temp
put whatFolder & "/" & x & cr after gHierList
end repeat
put the folders into tDirList
sort tDirList
now the folder with a leading space in its name comes before the ".."
delete line 1 of tDirList
And is now deleted :-(
repeat for each line x in tDirList
if x = ".." then next repeat
directoryWalk (whatFolder & "/" & x)
end repeat
end directoryWalk
change
delete line 1 of tDirList
to something like
filter tDirList without ".."
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.2/349 - Release Date: 26/05/2006
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution