View Full Version : Automatic labeling new added files
ngoh
Mar 22, 2009, 01:28 AM
Hello, I'm trying to come up with a script that will automatically label green (or whatever color) new added files on X folder. I have the new item alert script enabled on the folder, but would like to add the feature of automatic labeling.
Thanks for your help.
hiddenpremise
Mar 22, 2009, 10:44 AM
According to Finder's dictionary in Script Editor running on a 10.5.6 system, the featuring controlling label's is not available.
label n : (NOT AVAILABLE YET) A Finder label (name and color)
properties
name (text) : the name associated with the label
index (integer) : the index in the front-to-back ordering within its container
color (RGB color) : the color associated with the label
kainjow
Mar 22, 2009, 11:30 AM
If you have Xcode you can download the osxutils (http://osxutils.sourceforge.net/) package, and compile the setlabel tool which lets you set the label on a file. Combine that with AppleScript's do shell script command and you're set. If you don't have Xcode let me know and I can upload a compiled version of the program.
ngoh
Mar 23, 2009, 04:14 AM
If you have Xcode you can download the osxutils (http://osxutils.sourceforge.net/) package, and compile the setlabel tool which lets you set the label on a file. Combine that with AppleScript's do shell script command and you're set. If you don't have Xcode let me know and I can upload a compiled version of the program.
I don't have Xcode yet. I'd appreciate if you could upload the compiled version of the program.
Thanks for the help, hiddenpremise and kainjow.
kainjow
Mar 23, 2009, 10:48 AM
Here you go. The binary is in build/Deployment. To see how to use it in Terminal type "man setlabel.1" where setlabel.1 is the full path of that file.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.