Re: does anybody have a recursive directory subrountine???
Re: does anybody have a recursive directory subrountine???
- Subject: Re: does anybody have a recursive directory subrountine???
- From: q~ <email@hidden>
- Date: Fri, 14 Sep 2001 09:48:41 -0400
--
Sorry for the late post on this, my DSL line is down due to the WTC.
This subroutine has served me well and I thought I'd share:
on run
choose folder with prompt "Where should I start: "
set startdir to result
crawler(startdir)
end run
on crawler(startdir) -- expects folder to start at
tell application "Finder" to set stufflist to every item in startdir
repeat with x from 1 to count of stufflist
set testcase to item x of stufflist
if (kind of testcase is "folder") then
crawler(testcase)
else --work magic here
set testcase to testcase as string
display dialog testcase
end if
end repeat
end crawler