Ignore files when indexing a folder

I do this often as I now use Notebooks on iOS with Dropbox instead of DEVONthink To Go, and Notebooks creates .plist documents for each file. I use a Hazel rule to hide the .plist documents, but the same thing can be easily accomplished with a terminal command. Launch Terminal, change to the directory (and its sub-directories) that you wish to hide .plist documents. To change to my Notebooks directory in Dropbox, I first enter this command:


cd ~/dropbox/notebooks

I then enter this command:


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

to change the display back to visible, do the above and enter this command:


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

Note that if you have already indexed these folders into DEVONthink, you will probably need to index them again, as DEVONthink will still display the .plist files in the original indexed group. Also, newly added files will require that the Terminal command be re-run, which is not necessary with the Hazel rule.