• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: does anybody have a recursive directory subrountine???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: applescript-users digest, Vol 2 #1064 - 14 msgs
  • Next by Date: Re: Creating list references in handlers. Bad code or bug?
  • Previous by thread: Re: does anybody have a recursive directory subrountine???
  • Next by thread: How to resolve an alias in a path?
  • Index(es):
    • Date
    • Thread