How do I get a list of root-level indexed groups?

I would like to have a smart group showing all my “root level” indexed folders.

By “root level indexed folder”, I mean a folder where I’ve indexed that in Devonthink, as opposed to a child folder within an indexed folder.

The reason I want to see the root-level indexed folder versus the child-level indexed folders, is that I believe Devonthink3 treats these differently when deleting.

If I ever remove a root-level indexed folder and then empty the trash, I believe DevonThink will ask me if I also want to remove these from the finder. I can click “no”, and my files are left safely as they were.

However, if I remove a child indexed folder (e.g. a folder within an indexed folder) and then empty the trash, DevonThink won’t ask me if I want to keep the files in the finder, and will simply permanently delete them - both from DevonThink and also from the finder.

So it’s important to be able to easily distinguish between, and easily identify, the two types of indexed folders.

Thanks in advance,


Welcome @tomkerswill

There aren’t “two types of indexed folders” in DEVONthink’s metadata. There are only indexed or non-indexed groups, regardless of parentage.

In what instance are you deleting groups while not seeing their location?

Thanks for the quick reply! I think my first post may have been confusing. To make this clearer, I’ll use the same naming as in the In and Out: Importing & Indexing help section.

First scenario — for “individually indexed files, an indexed folder, or a parent folder, you will see a warning prompting you to choose whether to delete the item from the filesystem or just the reference in the database”

Second scenario — "if you delete a subgroup or a file in an indexed group and empty the database’s trash, you will be shown the standard trash warning […] If you accept this, the item will be moved to the system Trash […] to ensure both the Finder and database’s contents match.

So my question is — if in years to come, I want to remove an indexed folder from DevonThink, I need to know which of the two types it is. E.g. whether it is a parent or a child. Because if it’s a parent, I’ll get a warning, whereas if it’s a child, I won’t, and it’ll be deleted.

Although you say there aren’t two types of indexed folders… there are two types of behaviour that DevonThink exhibits — depending on whether it’s a parent indexed folder or a child (scenario one or two here).

So I’d like to know which of the two types this is before I delete it.

Does that make more sense?


You’re welcome!

Indeed, it makes sense and I understood your initial post. While I agree there are two distinct behaviors (especially as I wrote the Help :wink: ) there distinctions made by DEVONthink aren’t an accessible property for the end-user.

Development would have to assess the behavior and how it may be addressed.

Thanks! That makes sense, and I really appreciate the quick response.

It’s a bit of a sticky situation, as I cannot see a way how the user can know ahead of time whether Devonthink will delete the files from the finder or not (since there’s no way of distinguishing between the two scenarios). I definitely think it would be good if there is a way of doing this in future.

I did have a look at how I could do this with a smart group. One thing I noticed… If you have a parent indexed folder then its parent seems to always have an empty path.

So if there was a way of referencing the properties of a parent, you could have a smart group rule saying “Item is Indexed AND kind is group” (which you can already do) … but you could then add “parent.Path is empty” (which I think is not yet possible).

I’ve managed to get something that helps a bit… with the above smart search, I can also tick “Exclude subgroups”. That does then give me one list of my parent indexed folders… Although only the ones are not themselves within (non-indexed) groups.

My reason for being particularly cautious about this is that I use DevonThink to index some folders on a shared drive (OneDrive), which is used in my organisation. This works well, but I want to know that if I stop indexing one of these folders in future, there’s no possiblity of those shared files being deleted by DT when I unindex them… I can make sure I always only delete parent indexed folders, but it would be ideal to have a visual check of these before deleting.


Where are you seeing this? That sounds abnormal.

Sorry — I just really mean, that if you create a group on its own (without anything imported in it or without it being an indexed group) then in the inspector, it is shown with an empty path. This feels normal to me (though I don’t know, as am very new to DT!) but I think I just didn’t describe it well. Here’s what I see:

Ahh, yes that makes sense as a group created in DEVONthink has no path since there’s no folder created in the filesystem… unless the group was created in an indexed group in the database.

I might be only loosely touching the subject but I’d like to ask if it wouldn’t be helpful if indexed folders (not folders inside of indexed folders) had a context menu item “Stop Indexing”—wether additionally to “Move to Trash” or as a replacement is debatable.

a context menu item “Stop Indexing”

Development would have to assess the feasibility of this, especially as it would still have to purge the records from the database.

True, but it would only purge them from the database without touching them and their (formerly) indexed folder in the Finder. And it would say so in an unambiguous way.