I’m hoping someone here can provide some assistance, however, I suspect this is more of a query about using Hazel than DT.
I have written a combination of Hazel rules to tag and rename files. As a final step, I would like to import to DT. So the final step is copy to DT global inbox. The problem I now have is that numerous copies of the document keep being imported (therefore duplicates).
I assume that Hazel is running and rerunning the rules.
Can anyone assist me with how to correct this error, to only import once?
Hazel has a condition—which I by the way do really miss in DEVONthink—called
Date Last Matched. When set to
is blank a rule using this condition won’t apply to an item more than once. This comes handy when, for example, a temporal condition like
Has been Added in The Last X Minutes can not be used for some reason and the action of the rule does not include moving the item out of the watched folder.
A workaround could be to tag it as processed. This tag could be removed by a Smart Rule in DEVONthink afterwards.
Another approach would be to consider to not use a Hazel rule at all but a Smart Rule in DEVONthink on a folder it indexes. Which one is better depends on the use case of course.
Firstly, thank you very much for taking the time to respond. Your reply was very helpful and much appreciated.
If you don’t mind I’m going to try and pump you for more advice!
Perhaps if I explain in a little more detail what I’m trying to achieve, you might be able to tell me which method is best. Forgive me, I’m new to automation so would appreciate any views you might have.
I don’t normally store work documents in DT, because of the sheer size. Some documents I work with are thousand page PDFs, and DT tends to (in my experience) work better with smaller documents.
But I do have some smaller work documents (e.g. contracts) I would like to use with DT, as I’d like to build a bank of precedents for future use. I can then use the wonderful linking features in DT to find similar clauses and build a knowledge base.
So, my thinking was this:
- Import contract into my Hazel watched folder on my Mac.
- Get Hazel to rename and tag using my system on the Mac.
- Move or copy the document to the DT global inbox.
- Sometimes the file will move out of the watched folder using a Hazel rule, but sometimes it won’t (I won’t bore you with why this is).
My worry about using a smart rule with DT indexed folder is that I’m assuming it wouldn’t capture the files that are moved?
Any hints or tips appreciated.
Sorry, but I think there is something about your procedure which I don’t understand. At simplest, a Hazel rule which:
- renames an individual file; and then
moves (as opposed to copies) that file to the DT inbox
should not result in import into DT of any duplicates. In essence, once the renaming and import of that file is done there is nothing left on which Hazel can work in the watched folder.
Are you using the Hazel watched folder for other files or only for files which you want to rename and move to the DT inbox?
Thank you @Stephen_C and @rmschne for your respective responses.
I’ve had re-arranged the rules, using a “move to” the new and dedicated “2DEVONthink” folder that I have now set up and that has solved the issue. I don’t know why the issue was occurring before, and I will try and figure it out. In the meantime, this seems to work perfectly.
I’m grateful to both of you for taking the time to reply. Thank you.