Rename files in Preferences folder that have 'orange' label

I would like to rename files in my Preferences folder (/Library/Preferences) that have an orange label attributed to them. Any file with an orange label should be renamed with a "*' in front of it (ie com.native-instruments.Action Strikes.plist should become *com.native-instruments.Action Strikes.plist). I would also like to be able to do the reverse (ie *com.native-instruments.Action Strikes.plist should become com.native-instruments.Action Strikes.plist). Could you tell me if this is possible please, and perhaps point me in the right direction?

Use the For Each action with the Folder Contents collection to iterate through the files. Use the Get File Attribute action to get the tags, which I believe should allow you to determine if it has the orange tag (via the If Then Else action and the Variable contains condition. Then use the Move or Rename a File action to rename the file. Note that you cannot rename a file on to an existing file, so you may need to trash the existing file first if that is your intention.

So far, not having much success with this... Here is what I have so far (which doesn't seem to do anything)Move to Desktop.kmmacros (3.3 KB)

Any help you could provide would be most welcome!

John M