Re: Newie To AppleScripts, would like someone to look over a script
Re: Newie To AppleScripts, would like someone to look over a script
- Subject: Re: Newie To AppleScripts, would like someone to look over a script
- From: Chris Nebel <email@hidden>
- Date: Wed, 03 Jan 2001 11:22:02 -0500
- Organization: Apple Computer, Inc.
nellA hciR wrote:
>
-- for every file in the specified folder
>
tell application "Finder"
>
set aList to every file in folder "HD:Desktop Folder:folder"
>
repeat with anItem in aList
>
set locked of file (anItem as string) to true
>
end repeat
>
end tell
Don't bother with explicit loops if you don't have to. Using "every" directly is
simpler to write and faster to run:
tell application "Finder"
set locked of every file of folder "folder" of the desktop to true
end
--Chris Nebel
AppleScript Engineering