|
mac geekeryGet your geek on. |
Automated Finder LabelsDecember 27, 2005 - 2:03pm
QuestionDo you recall a script that made the rounds 2-3 years ago that involved automated sweeps of the filesystem to “tag” files that met certain criteria with color labels? (ie old files get tagged grey, “system” files tagged red, young files tagged green, recently accessed files set to pink) AnswerNo, I don’t recall it, and several Google searches came up dry. However, this is an easy enough task to do with the Read the manpage for a list of all the little flags you can pass to it (there are a ton) and you’ll be able to draft up some criteria for a group of files you want to mark. Once you have that, simply call find /Users/codepoet/Documents/ -name '*purple*' \
-exec osascript -e "tell application \"Finder\" to set the label \
index of POSIX file \"$PWD/{}\" to 5" \;
Make as many of these as you want, put them in a shell script and then use It works better without the line breaks, of course. About Adam Knight |
|
||||