I want to creat an automation to help me differentiate between **indexed** and **indexed parent** items

As a followup to How Do I Safely Manage Indexed Files, I would like to create a script to:

  • Add a indexed parent tag to each indexed parent item.
  • Change the icon of indexed parent items.

What is preventing me from doing this is knowing how to identify the indexed parent items.

There is a boolean property, indexed, that differentiates between indexed and imported items.

I see a parent property, but I think that would be the parent group of a particular record regardless of index.


In order to find the indexed parent would I look for the parent of each indexed record and if the parent is not indexed, then the current record is an indexed parent?

Each item can have multiple parents actually.

Are you looking for the top enclosing indexed group? Meaning for indexed groups which are not located in any other indexed groups?

E.g. a basic script could look like this:

tell application id "DNtp"
	repeat with theRecord in selected records
		if indexed of theRecord and (count of (parents of theRecord whose indexed is true)) is 0 then
			-- To-Do
		end if
	end repeat
end tell
2 Likes

I am looking for the indexed group or item that will let me un-index it and any child items without deleting the original files from the filesystem.

This sounds like this is what I need. :slight_smile: Thank you!

1 Like