Script to change file folder color labels in panther

I know it has been a long time since we had file labels

but is is possible to script this in panther


tell application "Finder"
	set theFile to choose file
	set theInfo to info for theFile
	set label of file theFile to "blue"
end tell

finder cannot set label of file to blue

Under Panther, labels are applied by index value, not by name (I so rarely use labels, I don’t know how they were handled before).

This means you can:

tell application "Finder"
   set label index of file "Path:to:some:file" to 1
end tell

You’d need to iterate through the labels to find which one is blue if you wanted to set the file to use a specific label.

thanks again
camelot

this is sort of related but i can not figure out why this will not work

tell application “Finder”
set theLooseitems to every item of desktop whose kind is not “Volume”
set the loosefiles to every item of theLooseitems whose label index is not 4
set theNewFolder to (make new folder at desktop with properties {name:“roundup_Folder”})
move theLooseFiles to theNewFolder
end tell

tia for any help
I am sure it is simple