Tip: Accessing/Editing Documents Outside of DEVONthink

Some of the folders that I index into DEVONthink are also used by apps that may add metadata about the documents with .plist files. I don’t want to see these files in DEVONthink, and the apps do not care if the .plist files are visible or not, so I hide them with a Hazel rule. Here is how it works, and as a disclaimer I have never lost any data using these rules, however one should test them first to see how they work in your environment.

In this example I am using a folder located at ~/Dropbox/Notebooks, and this folder is indexed into DEVONthink. The first Hazel rule is a ‘Go into subfolders’ rule so that Hazel will hide all .plist documents in all sub-folders of the Notebooks folder. The rule looks like this:

The second Hazel rule is the one that actually does the work, hiding all .plist files. The rule first tests to see if files are already hidden, as to not run on them unnecessarily.

Here is the code contained in the shell script.

find . -name "*.plist" -exec chflags hidden {} \;
exit

The user could, of course, modify the rule and/or create additional rules to hide any file names/extensions. Let us know how you are using it, or post any additional Hazel rules that you find useful when working with Hazel and DEVONthink.