Can DTP work with Finder Labels?

Hi

I was hoping to be able to use Finder Labels in creating a smart group in DTP, but there doesn’t seem to be that option (labels in smart groups are for DT labels). So I am wondering if there is any workaround. I have a lot of images that I have labelled in Finder and would like to be able to create different groups/smart groups for these in DTP. Once I have found a way of separating these images according to label I can of course use tags to sort them from then on. It’s just getting the images into DT sorted that is the issue.

Thanks

Nick

There is no inbuilt method in DT to do this.

You could script it, by having your script check the label index of the image in Finder and then set the DT label when you import or index the file to a target group. This snippet will get the value of the label index property from Finder for each file. Indexes range from 1 to 7. Adjust your DT label accordingly.

Be careful to test the label index number-to-color correlation, the color sequence you see in Finder Preferences > Label is not in the same sequence as the index property that Finder returns to the script.

set theFolder to choose folder
set fileList to {}
tell application "Finder"
	set fileList to every file of theFolder
	repeat with thisFile in the fileList
		set thisLabel to get label index of thisFile
-- the dialog is to confirm the correlation of label indices to colors
-- remove the dialog when it is not needed
		set thisMessage to (name of thisFile as string) & ": " & thisLabel
		display dialog thisMessage
	end repeat
end tell