Unindexing a folder

I indexed a folder … and then decided I don’t want the folder in Devonthink. How do I remove it from DevonThink without the whole folder getting deleted?

Delete the folder in DEVONthink. Empty the DEVONthink Trash and be sure to select the option “only in database”, which means that the links are removed from the database but the original folder is untouched and safe.

This dialog appears only when there are indexed files and/or folders in the DEVONthink Trash.

2 Likes

Ah. Thank you. I didn’t know that dialog would come up :slight_smile:

Note: This dialog will only come up if it’s the indexed parent folder you’re removing. If it’s a subfolder of the indexed parent folder, it will be removed.

1 Like

Ah. That’s good to know. I removed the parent folder… Everything worked fine. (Of course my innate paranoia had me zip up the whole folder before I tried it). :smiley:

2 Likes

What is the right way to remove an indexed subfolder of the indexed parent folder? (I think I faced this problem for the very first time as I need to unindex a subfolder of a dropbox folder which is indexed).

Second question: this behaviour you describe is really non-trivial. Do you think it would be beneficial to offer “unindex” feature which would safely unindex folders from within Devonthink w/o deleting anything in Finder. That would dramatically simplify workflow for people who index folders.

The way i can select “index files and folders”, it would be great to have “unindex files and folders”.

Hope this makes sense. Thanks.

1 Like

This isn’t possible. Instead of indexing the parent folder you have to index the desired subfolders only instead.

1 Like

Two questions:

  1. is this documented somewhere? (i am not sure I ever saw this in DT3x docs)
  2. do you think it would be feasible to offer a proper un-index feature to support this use-case out of the box

Just to re-iterate that I understand this correctly: to unindex a subfolder inside an indexed folder today i need to:

  1. unindex the root folder
  2. change the folder selection inside root folder
  3. index the root folder back

Observation: this sounds like a super error-prone process.

Perhaps it is helpful to think of indexing folders as not unlike working with a document. If you index a folder, then subsequent changes, additions or deletions, to sub-folders, will be reflected in the group structure in the database as well as in the folder structure in the Finder. Likewise, if you index a document and then delete sections (groups) in the document, then the changes will also be reflected in the document (folders) in the Finder.

Personally, I would find a command that allows one to un-index a folder in DEVONthink so that the folder structure in the Finder no longer mirrors the group structure in the database to be confusing at best.

1 Like

I am confused by this.

  1. unindex the root folder

Not possible at this time.

  1. change the folder selection inside root folder

What “folder selection” are you referring to?

  1. index the root folder back

? You want to index the folder you want to unindex" ?

PS: I will look at some clarifying language for the documentation.

Let us say I have a following folder structure in dropbox:

- Root-folder
– inside folder 1
– insider folder 2

Root-folder is indexed into DT3.

If now, for some reason, i want to exclude inside folder 1 from indexing in Devon, i have no straightforward way to do it.

My question was how to safely and easily do this? And where exactly this behaviour is documented.
If I have a function of indexing in Devonthink
image
it feels to me, that i should also have function of un-indexing to revert this action safely and easily.
Please correct me if I am missing something.

I almost deleted one folder (assuming I will be un-indexing it only) but then quickly realized that that confirmation dialog was missing asking me to only delete in Devon on in Finder.

As I said, I will be adding some clarification to the documentation, but yes, the behavior is expected and working as intended.

There is no procedure for unindexing a group.

The only thing I can suggest is:
You could move the group into DEVONthink, copy it back to the location in the Finder, then remove the group from DEVONthink.

Thanks for clarification and your suggestion @BLUEFROG.

May I ask if unindexing was ever a consideration or this is a rare request?
I just wonder if i can do a thing (index), I must be able to undo a think (un-index) to stop Devonthink from “tracking” this particular folder for indexing.

You’re welcome.

It has been discussed but it’s not necessarily a simple matter. If you indexed something, it is immediately available to undo the import (i.e., index in this case). However, unindexing would likely be something done downstream.

Given there is usually a large amount of data involved, this would also involve purging database metadata and indices too.

I found this thread after searching on Google how to unindex a folder on DEVONthink.

I’d like to say that, like @jooz I think it would make sense to have an option to un-index files and folders.
I think it wouldn’t make sense to un-index subfolders. But for the indexed parent folders, a simple option to un-index would make sense, in my opinion.
Deleting a parent indexed folder, and then emptying the trash in DEVONthink and selecting “Only in database” is not intuitive, and more likely in resulting in a user losing data unintentionally.

1 Like

oh no …… i may have deleted some imported documents by mistake if this is still the case. :grimacing:. There really should be a popup alert if deleting an item is going to remove it outside DEVONthink as well. Just a simple “Are you sure?” popup before deleting would be appreciated.

1 Like

Can you please be more specific about what “this” is? And do you actually have (or “may”) have deleted imported documents? What was the exact situation you had and how is it now?

I indexed many folders containing PDFs into DT and then proceeded to move and replicate the contents to organise them. I was transferring these files from my old laptop to my new one. They contained every PDF document on my old computer. I was using DEVONthink to sort out the contents into relevant categories. After indexing I realized that some of the content was irrelevant to my research so I attempted to unindex it and remove it from DT - but I didn’t want to delete it from my computer entirely.

Over the last few weeks since since transferring my PDFs into DEVONthink, I have noticed some inconsistencies between my backup PDF library on my old laptop and my new organized PDF database in DEVONthink. Some files which I thought I had indexed were missing from the DT database. But I only noticed that it was missing as a fluke. I don’t know how many other documents my have disappeared without my noticing.

EDIT: I double checked and can confirm that I have mistakenly deleted files when I thought I was merely unindexing them… The popup alert really should be more clear about this.

The top alert is what appeared after I first moved an item within an indexed folder into the trash and then emptied the trash. Luckily in this test scenario, this indexed item was the only item in the trash so I could easily determine whether or not the file was deleted from my filesystem or merely unindexed by DT. However, if I had more items in my trash, it wouldn’t be so easy to notice that the item in the trash belong to an indexed folder.

The second screenshot appeared after I moved an indexed folder to the trash and then emptied the trash. In my opinion, this warning should be the default when deleting indexed items.


Ok I constructed a scenario just to illustrate how convoluted and confusing it can be to unindex an item.


The two screenshots above are nearly identical. In both cases, there’s an item in the trash called “1x1_transparent”. In both cases, the item is indexed and the path to that item is “~/Downloads/untitled folder/1x1_transparent.png”. In both cases, the item is in the trash with 0 other instances (this means there’s no easy way to locate the parent folder. Running the command Data→Reveal just takes you to the trash.)

However, when I go to empty the trash, I get two different alert messages. One of them is the generic message that appears every time you empty the trash in DEVONthink, even if there are no indexed items in the trash. The other alert tells me that some of the items are indexed, and it asks me if I want to remove either the files & folders or only remove them from the database. In my opinion, this second message should appear whenever indexed items are being emptied from the trash.

In one case - in the top screenshot - I indexed the folder “untitled folder” whereas in the bottom screenshot I indexed the item “1x1_transparent.png”. But DEVONthink doesn’t display that information.

Now assuming I’m familiar with this limitation of DEVONthink, whenever I empty the trash in DEVONthink I’ll have to check item by item to determine whether or not I’m deleted indexed items because I cannot rely on DT alert messages to inform me. (To make this easier, I created custom metadata and a smart rule to display whether or not the items are indexed.) Now if I go to empty the trash and I know I have indexed items in the trash, and DEVONthink displays the generic warning rather than the special warning for unindexing items, I can deduce that some of the items in my trash are children of indexed parent folders. Since I’m just trying to unindex the items and not fully delete them from my computer, my next step must be to track down the parents of the indexed item in DEVONthink and move them to the trash. But as demonstrated by the example above, the “Reveal” command won’t help in this scenario – running “Reveal” just shows the item in the trash.

I am baffled by how convoluted this is. So I’m wondering, how would other users handle this type of scenario?

Yes, that is still the case. You cannot unindex a folder.

The deletion behavior is all covered in the Help > Documentation > In & Out > Import & Indexing > Indexing and the filesystem.

It’s also why indexing should not be used without careful consideration of how you’re managing your files. Just one more reason importing is the default behavior.