How to Install the Import & OCR Rule
macOS folder actions are a method of attaching scripts to folders in the Finder, allowing automatic actions on items in those folders. DEVONthink has long provided some folder actions but these have been largely superseded by certain smart rules. Smart rules are saved searches in DEVONthink that present their results like a regular group and also act on the found items. As we generally advocate using smart rules over folder actions, here we will set up a smart rule replacing our Import, OCR & Delete folder action.
Scanning is a big part of many DEVONthink users’ to-do list – whether personal or professional. In order to be searchable, scans need to have OCR done on them. We have provided a new smart rule replacing the Import, OCR & Delete folder action for use in the Pro and Server editions of DEVONthink.
How to set up the Import and OCR smart rule
To install the smart rule we have prepared a step-by-step guide:
- In the Finder, create a folder to use as the location to scan to. A folder like Scanning In located in the Downloads folder would work well.
- In your desired database in DEVONthink, e.g., the Global Inbox, select File > Index Files and Folders and select the folder you created in step 1. Take note of the small Finder property icon to the right of the group’s name, indicating it’s an indexed group.
- Optionally, create a destination group in a database to receive the resulting documents. Note this group does not have to be in the same database.
- Choose Help > Support Assistant, tap the Install Extras link at the bottom, and install the Import and OCR smart rule.
- In the Smart Rules section of the Navigate sidebar, double-click the newly installed smart rule and make these changes:
- Press the Search in drop-down menu and choose the indexed group from step 2.
- Optionally, add a Move action and select the receiving group if you created one in step 3 or choose another location to move the processed documents. This keeps the scanning input group clean for future input.
- Make any other changes you wish, e.g., tagging documents, etc.
- To make this a bit more automated, you can add an On Import event trigger so the documents will have OCR done on them when DEVONthink detects them in the indexed Finder folder.
- Press OK to save the changes.
Give it a test run
Now switch to the Finder and drop a test document into the indexed Scanning In folder. Note that the test document should not already be searchable. If you’ve set the On Import event trigger, the smart rule should move the document into the database, OCR it, then optionally move it to the destination group, if specified. If you didn’t set the event trigger, you can Control-click the smart rule and choose Apply Rule to run it manually.
After you’ve tested the smart rule, you can drop scans into the input folder or even specify in your scanning application that scans should be dropped directly into that folder. Now you should have OCR done on your scans automatically.
Feel free to inspect or duplicate this smart rule via the contextual menu to understand how it works. More information is available in the Documentation > Windows > Sidebar: Navigate > Smart Rules section of the help and the documentation. This includes links to other sections of the help with more information on smart rule creation.
Note: In modern versions of macOS, e.g. Big Sur or later, you may be prompted to allow our DTOCRHelper to access a location, like the Downloads folder. Please make sure you allow this access.