Unclear if this behaviour is normal? Trashing Indexed Groups

Hello all,

In deciding whether to Import or Index a new DB, I’m experimenting a bit with things, to better make up my mind about what to settle on…

I’m a bit stumped at the moment with something, with me thinking the opposite would happen - and would appreciate some clarity…

I’ve created 5 “Test1/2/3/4/5” folders inside an “Experimental” root-folder.
I’ve indexed that Root Folder.
Each of the sub-folders have 2 items in them.

Inside DTPO, I create a new Group [“My New Test Group”] as a sub-group inside the “Experimental” group.

I move each of the files from Test1 and Test2 into the new “Test Group”.
I delete the two (now) empty Test1 and Test 2 folders.

Over on the sidebar, I select ‘empty trash’, and then select “Files & Folders”, as opposed to “Only in database”, when the Trash Warning dialogue pops up [“Some items are indexed, external files and/or folders. Also remove these files and folders? This cannot be undone!”]

What I thought would happen:

1.) Over in Finder, the four documents would be moved over to a newly created folder called “My New Test Group” >> I’m pretty sure I have this part wrong, since I seem to recall reading that whereas DTPO can watch Finder, it cannot “write” back to Finder… Which is probably for the better…

2.) Regardless of the above, secondly, that Folders’ Test1 and Test2, together with their contents, would be deleted/moved to System Trash.

This is not happening. When I jump over into Finder, the two folders, together with their contents, are still there.
As a result, when I hit the root group in DTPO again, the two deleted groups are re-indexed, together with their contents. And the newly created folder, now contains the contents moved earlier, and are now reflected as Duplicates.

Can someone please confirm if the above behaviour is as expected, particularly step 2?

Everything that you describe is the expected behavior. It is a safeguard from deleting indexed documents, and here is why/how it works.

The indexed groups may be empty in the database, but the folders in the Finder still contain the documents that you moved in the database. If DEVONthink were to delete these folders from the Finder while they still contained documents, then you would have inadvertently deleted the documents from the “Test Group”.

Had you moved the documents into the database, moved them to “My New Test Group”, moved the “My New Test Group” to the external folder, and then deleted the respective indexed folders, then they would have been deleted in the Finder. Also, had you never moved the indexed documents to another group in the database, deleting the indexed Test1 and Test 2 groups as you did would have also deleted the Test1 and Test 2 folders and their documents in the Finder.

Thanks Greg - appreciate the assistance. Could I bother you again to explain my understanding of the above?

The “moved the documents into the database” – as in imported them into the DB? And the “moved the ‘My New Test Group’ to the internal folder” part >> I’m missing you here?

Are you saying the Finder delete would only happen if I selected the files I wanted to move around inside DTPO, in Finder instead - and imported them into the DB, and then moved the ‘holding’ folder out of the Indexed Group over in DTPO, into a different group, and then delete the indexed sub-groups in DTPO? Do I have that part right?

I just tried the latter, and this worked - thanks!

If you right-click on any indexed document in the database, even if it is no longer in the original group that is indexed, you have a menu option to ‘Move Into Database’, which does import the document. Likewise, if any imported document in the database is in a group that is indexed, right-clicking gives you a menu choice to ‘Move to External Folder’, which exports the document out of the database.

Given that, if I have two filesystem folders (FolderA and FolderB) that are indexed in a database, I can right-click on indexed documents in the indexed group and move the documents into the database. In your example where you have sub-groups inside an indexed group, you can also right-click on the sub-group and move the entire group and its contents into the database. You can even leave them there, as DEVONthink is perfectly fine with having documents and groups, which are contained in the database, inside a group that is indexed from the filesystem.

Additionally, you can move any document or group to an indexed group, right-click on the selection, and there is a menu item to ‘Move to External Folder’. This is the only way to move indexed documents around in the filesystem to avoid ‘indexed document missing’ errors in DEVONthink. In other words, if I want to move a document from FolderA to FolderB in the filesystem, and both folders are indexed groups in a DEVONthink database, I have to select the document in the FolderA group in the database, move the document into the database, move the document to the FolderB group in the database, then move it to the external folder (FolderB in the Finder). All this sounds a lot more complicated than it is. Once the process is understood, actually moving indexed documents and groups around in the database is a fairly simple and reliable process.

Perhaps the simplest way for me to explain this is as follows-if you want to delete indexed groups in the database and have the corresponding folders deleted in the Finder, then either a) the folder needs to be empty in the Finder, or b) all the contents of folder must also be in the trash of the database where you are deleting the indexed groups. Your process did not delete the Finder folders, because they still contained documents that were not in the trash in the database. They were then reindexed back into the database because they are sub-groups of an indexed folder.

Don’t hesitate to ask if you need further clarification or examples. All this is intuitive to me as I’ve done it for years and I have a good handle on how the process works. As a result, I’m sure I overlook posting steps or other relevant info that I just take for granted. Happy to help any way I can.

Greg, help you have - I really appreciate your detailed response. It’s helped me figure things out this side.

The above has confirmed I would probably be better served sticking to the import option.

My Finder structure for this DB is a bit of a mess - built up over years and years on various Windows’ machines. Nested-folder within nester-folder ad infinitum

Whereas getting things into DTPO are certainly straight forward in most situations, I am being met by situations where I either save it into the Finder structure, or only have the DTPO Inbox available. The latter is not efficient, since it involves following up at a later stage to get things out of the Global Inbox, into the relevant DB. The former is (currently) cumbersome, due to the mess of the Finder structure.

I was hoping for the best of both worlds, which would have seen me Indexing the Finder structure at the root, and then (only) tidying things up inside DTPO - but for this to work properly, I (now realise) need to have something cleaner/more structured over in Finder first.

I think I’m going to get the Finder side of things sorted, before making the call on whether to import/index. The latter remains appealing, but I think I’m going to have to get my folder structure into such a state that I won’t need to make too many changes to it first.

Thanks again for the assistance.

If you have a Finder structure that needs serious housekeeping and reorg work, and also want to consider an indexing approach in DEVONthink, it is some times useful to create a new database, import all the of the relevant Finder folders, reorganize within DEVONthink (including using the AI tools), then export the revised structure to a new location in the filesystem. Close that temporary database and now index the new structure in your working database(s). If all is well, then you can delete the old folders – or zip and back them up.

Thanks korm. As always, a very useful suggestion. I never would have considered this, until now.

I was planning on tidying things up on the Finder side - whilst simultaneously acknowledging it would be so much easier to do that inside DTPO. You’ve potentially saved me some serious effort. 8)

Thanks to Greg explaining things, I realise that the key will be my getting the Finder side sorted out. That way, Indexing will allow me to still drop things in Finder, and have it work its way over to DTPO, without having to jump through too many hoops…