I’m indexing my Documents folder, and I’m gradually clearing out stuff that isn’t actually a document that I want indexed. However, I have an errant application that insists on putting its files in a subfolder of my Documents folder, and there’s no way to change this. If I remove the associated group from DevonThink, it comes back the next time I manually update the index. I managed to get those files off of iCloud at least by moving the folder and symlinking back so the application still works. Then I thought if I made the folder invisible, maybe DevonThink wouldn’t pick it up. Unfortunately, no dice.
So is there any other way to exclude this folder?
I think it would be good if DevonThink excluded invisible folders/files by default, or at least had an option to do so.
No, this is currently not supported. If you don’t want a specific folder indexed, it shouldn’t be in an indexed parent folder. Index the specific Finder folders instead.
Thanks, but if I don’t index the parent folder, then I have the opposite problem of having to manually add new folders. Would you consider a feature request to add a way to exclude folders from indexing? I think having DevonThink ignore invisible files/folders is not unreasonable.
It already does. Your problem is you changed the folder’s state after you indexed. DEVONthink is not a filesystem; it’s a database, so the entry in the database’s index is already established.
Trash what you’ve indexed, empty the database’s Trash – choosing Only In Database when prompted. Make what you want ignored invisible in the Finder – noting this is specific to your circumstance, not general advice to everyone – then index again.
Thanks again for your reply. I tried exactly that before I posted my last reply, but in case I had somehow missed a step, I just tried again. The folder in question is invisible in the finder (has its invisible bit set and does not appear). I removed the associated group from DevonThink, emptied the trash, chose “Only in Database”, but the folder returns when I update the index. To be clear, I’m choosing “File → Update Items”. If this is supposed to work, what else could I be missing?
(has its invisible bit set and does not appear).
It’s set where?
I created the hidden folder via Terminal (as is usually done)…
Then indexed this folder into DEVONthink…
Empty as expected.
That’s a hidden file, different from invisible. Invisibility is a Finder feature - it’s the same feature used to keep the ~/Library folder from appearing in the Finder. It can be set a number of ways. I used PathFinder, but you can also do it from the command line using the old (deprecated) SetFile command, or the more recent chflags command.
In the process of looking up this info, I noticed the man page for chflags mentioned setting the invisible bit on a symlink vs the linked-to file/folder. When I originally posted, I had only set the bit on the symlink. I went back and set the invisible bit on the folder itself and tried the whole process again. Thankfully, it worked! The folder is banished from DevonThink.
Thanks again for your help.
chflags is definitely not something we’d openly advocate, but indeed it could be used by the brave and knowledgeable. Glad it worked for you. Cheers!