Smart rule, OCR

Turned off Hazel.

I tried just drag and drop two PDF files straight to DevonThink Folder(Finder’s) and again it just OCRd one the other remained in the Global-Inbox. Strange.

Strange because apparently Criss tried it and it works for him.

I would imagine, the way it would work is that if I import two or ten files at once, they would be cued once one is OCRd and moved then another is CORd and moved and so on.

What I think is a hiccup, the system doesnt know what to do when multiple files are in, doesnt know what is the second item of 10 items

That is truly bizarre. Just to be sure, can you post (or PM) the part of the script which points to the folder “Unit 1,2”? And just for fun, try using “This Hour” rather than “This Week” - just because that is what Jim was using when it worked for him.

If you select the smart rule when the PDFs are in the inbox (and the rule hasn’t run), are the files shown by the smart rule?

Re your addendum: thing is, the script definitely takes care of multiple files…

  • Does this persist after quitting and relaunching DEVONthink?
  • Does it persist after a machine reboot?

Yes I was thinking the timing too, I just downloaded two pdf files just now to make sure it was this week. but didnt work.

Also i changed the This Week to This hour. and still no.

Yes when I select the smart rule the files shows for a millisecond then poof.

hmm

Yes it persists after quitting relaunching.
Yes it persist after reboot

ok, so that suggests they don’t fulfil the criteria - would you mind removing each condition individually and seeing whether the files then appear in the rule (without running the rule or importing anything, of course - otherwise it may have undesired effects)?

ok. I removed the criteria "date added…is……) and now it shows PDF files, of course these files are from previous dates.

Sure - but does it (also) include the files which you added today for testing and would have expected to see in the rule in the first place? That’s what we’re looking for - a change which makes those files appear which you had expected to be there in the first place. Because I seem to have been barking up the wrong tree (for which I apologise!)

Well when I remove criteria “Added this hour or Today” of course it wont show, it only show previous files.

And when I add back criteria “this Hour/today” files that I added today it doesnt show.

I wonder what it could be. hmmm

I will delete this smart rule and start a new one with the same craters. lets see if this make any difference.

So I deleted the smart rule and created a new smart rule, now drag and dropping from “download folder” to DevonThink folder(Finder) it doesnt do anything just goes straight to Global Inbox. Strange.

when I turn Hazel ON, just like before just the first file OCRd and moves to the specific folder. and the rest are left out, I have to “Apply rule” to process the rest. Strange.

Thanks for your help Blanc, but i dont know what could be the issue.

Are you quite sure the files you are dragging to the inbox do not contain a text layer?

No, they dont contain any text layer. They are full PDF files.

The issue is when importing multiple files, as single files work fine.

What’s your Hazel rule look like?

like this.

Could this be a permissions thing? Does DT have permission to control Finder and Full Disk Access? I admit I’m clutching at straws here.

Yes it looks like DevonThink has permission and full access.

It might have to do something with Hazel. I tested again and drag and drop two files it worked one right after the other, no problem. Then I turn hazel on and downloaded two files, Hazel then moved the two files to DevonThink folder(finder) and again it just OCR and moved one file.

I’m really sorry, I’m at a loss to explain that behaviour - the only workaround I can suggest is to use a smart rule which runs regularly (rather than on import) using your conditions and triggering “my” script; I seem to remember that you’d need to do it with the script if you want the notification, because a smart rule will trigger the notification even if there were 0 documents matching the conditions. As I remember it, the script won’t be triggered in a 0-document scenario; if it were, you’d simply add an if workedFiles > 0 then to the display notification line.

Yes thank you for the suggestion and your help.

But I think I know what might be the issue, it’s not the smart rule nor Hazel. I think it has to do the way DevonThink gets its incoming information about the imported items.

When drag and dropping, the system and DevonThink knows what is in it (rightly so it cues each file) but when Hazel sends each file one right after the the other, it takes about 1 to 2 seconds delay SO while the first file is being OCRd the second file is coming in, so that right there could be the mishap, DevonThink then ignores other files coming in while the first file is being processed.

Maybe that; @cgrunenberg is that possible? If so, is it a bug, or inherent to the working of DT?

How depressing, I’d hoped to solve this one. If you do come up with a solution, please be sure to post it here :slight_smile: thanks

1 Like

For sure, thanks for you time and suggestion :slight_smile:

**
My previous message, last sentence should have read “DevonThink then ignores other files coming in while the first file is being processed.”

1 Like