• 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: Need Automatic Folder Color Labeling Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Automatic Folder Color Labeling Script


  • Subject: Re: Need Automatic Folder Color Labeling Script
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 30 Apr 2007 12:23:59 -0700

On Apr 30, 2007, at 11:55 AM, Aaron Gates wrote:

I'm a recent switchover to Apple and I'm trying to figure out a way to
organize one of my folder structures (job folders). I always drag a
standardized set of folders into each job folder and then organize my files
into them. Is there a simple script that would allow me to have the the
folders within that set of folders automatically turn red when a file is
placed in them and leave the empty folders colorless?

I'm trying to figure out exactly what you want. You have a top-level job folder. Let's name it "top" for the purpose of this discussion.


Inside top you have a group of folders, let's call them level1-1, through level1-n.

You want a folder at level1 to turn red whenever a file is placed inside it, but to leave all the other level1 folders white until files are placed inside them, right?

Save the following script as "set label to red" in the folder "folder actions" of the folder "scripts" of the folder "Library" of your startup disk.
on adding folder items to this_folder after receiving these_items
tell application "Finder"
set label index of this_folder to 1
end tell
end adding folder items to


Then save this script to the same place as "attach actions"

on adding folder items to this_folder after receiving these_items
	tell application "System Events"
		repeat with this_item in these_items
			attach action to this_item using "set label to red"
		end repeat
	end tell
end adding folder items to

When you create a top-level folder ("top" in this example), attach the second script ("attach actions") to it. Then when you move the level1 folders into "top", the script attached to top should attach the "set label to red" script to each level1 folder.

Then when you add an item to a level1 folder, it should turn red.

I have not tested these scripts, but I believe they should work.

-- Michelle

--
Grandparents and grandchildren are natural allies.
They share the same enemies.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Need Automatic Folder Color Labeling Script
      • From: Aaron Gates <email@hidden>
References: 
 >Need Automatic Folder Color Labeling Script (From: Aaron Gates <email@hidden>)

  • Prev by Date: Need Automatic Folder Color Labeling Script
  • Next by Date: Re: Need Automatic Folder Color Labeling Script
  • Previous by thread: Need Automatic Folder Color Labeling Script
  • Next by thread: Re: Need Automatic Folder Color Labeling Script
  • Index(es):
    • Date
    • Thread