• 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: Simple folder walk...I think
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple folder walk...I think


  • Subject: Re: Simple folder walk...I think
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 16 Aug 2002 08:37:27 -0700

On Friday, August 16, 2002, at 07:17 AM, John Tuttle wrote:

The folder handler works (I think) but I get an error when the file handler
runs. Any ideas? The script is below, also, any constructive comments on
structure are welcome...lots to learn!

Well, for one thing, instead of making a list of all items in the folder and figuring out which class they are, try this instead:

set myfolder to choose folder
handleFolder(myfolder)

to handleFolder(thisFolder)
tell application "Finder"
set filelist to files of thisFolder
handleFiles(filelist)
set folderlist to folders of thisFolder
repeat with myfolder in folderlist
handleFolders(myfolder)
end repeat
end tell
end handleFolder

to handleFiles(myfilelist)
repeat with fileToProcess in myfilelist
-- do whatever you need to do with the files
end repeat
end handleFiles


We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Simple folder walk...I think (From: "John Tuttle" <email@hidden>)

  • Prev by Date: Re: Simple folder walk...I think
  • Next by Date: Re: Duplicating a File
  • Previous by thread: Re: Simple folder walk...I think
  • Next by thread: Re: Simple folder walk...I think
  • Index(es):
    • Date
    • Thread