wouter
Mon, 01 Sep 2003 10:47:53 +0000
on mouseUp put "" into fld "Result" answer folder "Pick a folder you want to walk:" if it = "" then exit mouseUp put it & "/" into tMainFolder put the directory into tOrigDir directoryWalk tMainFolder set the directory to tOrigDir end mouseUp
on directoryWalk tDir
set the itemDel to "/"
put "" into tDirlist
repeat
if tDir = empty then exit repeat
set the directory to tDir
put tDir & cr after tHierList
if the hilite of btn "theFiles" then
put the files into temp
repeat for each line x in temp
put tDir & x & cr after tHierList
end repeat
end if
put line 2 to -1 of the folders into tTempDirList
repeat for each line x in tTempDirList
put tDir & x & "/" & cr after tDirList
end repeat
put line 1 of tDirList into tDir
delete line 1 of tDirlist
put "" into tTempDirList
end repeat
sort tHierlist
put tHierlist into fld "result"
end directoryWalkon mouseUp put "" into fld "Result" answer folder "Pick a folder you want to walk:" if it = "" then exit mouseUp put it & "/" into tMainFolder put the directory into tOrigDir directoryWalk tMainFolder set the directory to tOrigDir end mouseUp
repeat
if tDir = empty then exit repeat
set the directory to tDir
put tDir & cr after tHierList #### directories with or without the files
if the hilite of btn "theFiles" then
put the files into temp
repeat for each line x in temp
put tDir & x & cr after tHierList
end repeat
end if put line 2 to -1 of the folders into tTempDirList
repeat for each line x in tTempDirList
put tDir & x & "/" & cr after tDirList
end repeat
put line 1 of tDirList into tDir delete line 1 of tDirlist
put "" into tTempDirList
end repeat
sort tHierlist
if the hilite of btn "ShowHierarchy" then ShowHierarchy tHierlist
else put tHierlist into fld "result"
end directoryWalkHave a nice day, WA _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution