Re: Problem with folder searching script
Re: Problem with folder searching script
- Subject: Re: Problem with folder searching script
- From: Michelle Steiner <email@hidden>
- Date: Thu, 21 Oct 2004 20:24:04 -0700
On Oct 21, 2004, at 2:33 PM, John Goodchild wrote:
I am trying to write a script that searches the contents of a set of
folders. When the script finds a folder, it processes the contents of
that folder etc, etc.
Here is a template script that traverses folders.
set the topLevelFolder to (choose folder)
tell application "Finder"
set foo to files of the topLevelFolder
set bar to folders of the topLevelFolder
end tell
ProcessFiles(foo)
processFolders(bar)
to ProcessFiles(filesToBeProcessed)
repeat with thisFile in the filesToBeProcessed
-- do what you will with the files
end repeat
end ProcessFiles
to processFolders(foldersToBeProcessed)
repeat with thisFolder in foldersToBeProcessed
tell application "Finder"
set foo to files of thisFolder
set bar to folders of thisFolder
end tell
ProcessFiles(foo)
processFolders(bar)
end repeat
end processFolders
--
I am Dyslexic of Borg. Fusistance is retile. Your ass will be laminated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden