Skip to content

Instantly share code, notes, and snippets.

@apricot13
Created March 28, 2013 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apricot13/5263239 to your computer and use it in GitHub Desktop.
Save apricot13/5263239 to your computer and use it in GitHub Desktop.
An applescript to monitor a folder and add a red label to any new files/folders added.
-- I want edited folders to be red.
property red : 2
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
-- set label of the 'watched' folder to red
set label index of this_folder to red
-- for the items added
repeat with item_ in added_items
if kind of item_ is "Folder" then --if its a folder then make it red
set label index of item_ to red
else -- else make it red....!
set label index of item_ to red
end if
end repeat
end tell
on error
display dialog "Error occured"
return
end try
end adding folder items to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment