Re: script help. Change labels to none if...
Re: script help. Change labels to none if...
- Subject: Re: script help. Change labels to none if...
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 15 Jun 2001 23:47:23 -0400
- Organization: [very little]
>
Date: Thu, 14 Jun 2001 22:39:43 -0400
>
Subject: script help. Change labels to none if...
>
From: Thierry Lavall <email@hidden>
>
To: <email@hidden>
>
>
hi,
>
>
Is there a way to build a script that will make ALL my files on my HD to
>
turn their label to <<none> if they are already set to <<hot>>?
>
>
thanks for your help!
The Finder object "item" has a property "label index". No label is a
label index of 0. "Hot" is a label index of 2 (unless you've changed
it). So:
set x to (choose folder)
tell application "Finder"
if label index of x is 2 then
set label index of x to 0
end if
end tell
That'll do it for one item. The next step is to wrap this code in some
sort of recursive logic that will dig through the hierarchy of files and
folders contained in your source folder and apply the above code to each
item. You can code this directly in your script, which would execute
very slowly, or use features from the Akua Sweets or Jon's Commands
scriptings additions which would execute about 100 times faster.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[6/15/01 11:46:26 PM]