How can I set up a smart rule that, on import, converts a .txt file that begins with the three characters in sequence “4x-” to .rtf, renames it to the Long Creation Date, and moves that .rtf to a different group in the inbox, without leaving the original .txt file behind (or deleting the originally imported .txt file)?
I always seem to have to leave the original .txt file in the trash, or in some other ad hoc group that it can’t be deleted from immediately.
Please note that the last action is applied to the original. If you would use Convert & Continue, then the last action would delete the converted text.
For instance, this rule sends the plain text version to the trash, but leaves the converted .rtf in the Inbox - it doesn’t move it to the “special” group (which is a group inside the Inbox):
You’re still somewhat misunderstanding the flow of the input in smart rules. Once the input has changed, e.g., when using a Convert & Continue action, it can’t be returned to the original input (at least at this time, it can’t).
Look at this smart rule and notice the input never changes…
Hi,
this is an elder discussion, but I think my question matches the subject…
Trying to create a rule, that looks for PDF in the Income Folder, executes OCR, than looks for document Date and suggested name.
If I want to delete the original doc, it always deletes the new copy with the new name.
If I move it to another folder in the database, the rule doesn´t do anything…
I´m sure I´m just a little mistaken, so thanks for any help!
if you use the Convert & Continue action instead of the OCR action, and move your Move to Trash action to the first position then all will work as intended. Convert & Continue means that all subsequent actions are performed on the new document. It may seem counter-intuitive to move the original file to trash first, but that’s the only way to act on the original - namely prior to the Convert & Continue action. Obviously your new file will be created in Trash, but that is of no consequence as you are already using a Move action.
alternatively you can forgo the Move to Trash action when using the OCR action if you choose the appropriate setting in the preferences (see OCR/Original Document: Move to Trash); AFAIK the following actions will then pertain to the OCR’d file.
currently your rule OCRs documents which already contain text; that can degrade document quality. You might want to add a second condition, namely Word Count is 0. That way only PDFs without a text layer will be treated by the rule. You could then set up a second rule with a Kind is PDF, Word Count is not 0 condition which only changes the name and moves the file, but does not OCR ist.
Isn’t that what I said? With more words, of course - but you folk should be used to that by now Criss, is the behaviour of OCR > Apply not dependent on the setting I mentioned? If it is, then the advantage of my first approach is that it would work for everybody, regardless of settings in the preferences (which I find preferable in a forum like this). If, of course, OCR > Apply is independent of preferences then I just wrote a long and pointless post
Hey,
thank you very much, both solutions work fine! Just starting with Devonthink, what a great tool!
Is there a way to check within in rule if OCR has already been performed? But I think there has to be an “if” condition? If no → perform, if yes → don´t ?
THX
Thilo
The first one performs OCR on not yet searchable PDF documents and then applies the second rule which checks the word count and processes only searchable PDF documents containing text (e.g. after successful OCR).
Thank you, with two rules it works fine. So I move from Inbox-unchecked to Inbox OCR to Inbox renamed, that helps me at my actual knowledge level (0,0) to verify that the rules have been executed.
General remark: this is a very kind and helpful forum, wherever/whatever I read, thank you for that!
Have a nice christmas-time
Thilo