Folder Action Script: ColorFilesRed

Folder Action Script, colors all files in folder red.
Useful to use on the Folder “Failed” or something like that

on adding folder items to this_folder after receiving added_item
tell application “Finder”
set chosenLabel to “2 (red)”
set labelIndex to word 1 of chosenLabel as integer
set labelColor to word 2 of chosenLabel as string
set label index of items of this_folder to labelIndex
end tell
end adding folder items to

Cool little script! I was just thinking about having a script that colored files. I wasn’t sure if it was possible or how to do it. Thank you vary much