Hi I have a folder action setup to import, scan/OCR and delete a file when placed into a particular folder. This worked flawlessly until I upgraded to Catalina last night. Now it doesn’t seem to pick up the fact that anything was dropped in the folder. No action is taken. This is a slightly modified version of the import/scan/delete script included with DT Pro.
on adding folder items to this_folder after receiving added_items
try
if (count of added_items) is greater than 0 then
tell application id "DNtp"
set theGroup to get record with uuid "E3BACE3F-A9F4-42A1-8D62-187EDEC11280"
end tell
repeat with theItem in added_items
try
set thePath to theItem as text
if thePath does not end with ".download:" and thePath does not end with ".crdownload:" then
set lastFileSize to 0
set currentFileSize to 1
repeat while lastFileSize ≠ currentFileSize
delay 0.5
set lastFileSize to currentFileSize
set currentFileSize to size of (info for theItem)
end repeat
tell application id "DNtp"
set theRecord to ocr file thePath to theGroup
if exists theRecord then tell application "Finder" to delete theItem
end tell
end if
end try
end repeat
end if
end try
end adding folder items to
I’m not sure whether the Catalina update has any impact on these settings but did you check that folder actions are still enabled and the action is still attached to the folder?
If you already use DEVONthink 3, then smart rules are a good alternative to folder actions.
If I put a “display dialog” before this I can see it, but not after this line. The script seems to crash with this. I can replace this line with “import thePath” and that seems to be fine, but something is not working with ocr. Any suggestions on how I can further debug this? I’ve verified through dialogs displaying vars that thePath and theGroup are both set correctly.
As noted in your support ticket, OCR in DEVONthink Pro Office will not work in macOS 10.15 Catalina. It is a 32-bit process and cannot be run on the new operating system.