Instead of a smart rule, I use an AppleScript to assist with processing records in my Inbox.
It does renaming, tags, etc
Script code can present a list of “type of documents” for selection
In case you’re not aware, in the “Change Name” field in Batch Process… or a Smart Rule, you don’t manually input text (besides static text). You right click and navigate to “Insert Placeholder” – there’s a long list to choose from.
not really a criteria, I listed them for examples and I mentioned that for my knowledge I dont think I can do it at the moment.
Batch processing seems to be useful for me, but does it only work effectively for renaming multiple similar files?
Batch processing doesn’t know about the files. It operates on the selected items. That could be one file or a hundred. And the actions you use are up to you as well. You could completely change the name of all the selected files without regard to their current name, e.g., DSC_20241107-104454.png could be renamed to Happy Dogs 001.png.
Batch processing is basically just an ad hoc way to fire off a custom smart rule on selected items. It remembers the last used settings, but if you’re gonna use the same settings regularly, you are better off setting up a Smart Rule. Then it will also trigger automatically, according to the criteria you define.
If you already have a rule set up, instead of letting it trigger automatically, you can also right click one item or a selection of multiple and choose Apply Rules > [List of smart rules, choose one]
There’s also a section on Smart Rules in the chapter Automation, and a full list of the different options under Appendix > Smart Rule Events and Actions
To give you an idea, this is the same as your example in the opening post:
Where _Syllabus_ is manually entered, and Name is the original item name. I got Creation Year from Insert Placeholder > Creation Date > Year
… Oh, I guess I am missing the “Change Case” to “Title Case”. But DEVONthink comes with a Change Case script, found in the script folder Rename. You can either use that before you batch process, or you can incorporate it directly in a Smart Rule.
I found that intriguing when I insert placeholder, this could actually be my lifesaver.
There are some terms that I do not quite understand the difference
for example:
name vs. proposed name vs. name without date
Are there any documentation specifying these terms?
One more thing:
I saw the AppleScript of downloading DOI, which means there may be a possibility that devonthink can be a reference manager.
I wonder how does that work if the workflow is based on APA format, would that be possible by using smart rule to change name to [year] - [author] - [title], and would that be easy to extract either the APA formatted reference or citation?
and also:
suppose I want to replace / delete text from the file name, what should I do? or how do I let devonthink detect them?
by defining a string? or something else?
I actually already told you where the placeholders are documented:
In general the Appendix is where you will find descriptions of all the different options and details not explicitly covered elsewhere.
For renaming/manipulating the original filename, it depends. There are several options.
For example, the Name without date placeholder is the original filename with any dates removed.
In the Rename script folder, there are the scripts Rename using RegEx and Replace Text…
Most likely, you want to use the Scan Name action in a Smart Rule or Batch Process. This lets you specify a string to capture in the filename, and you can then insert a placeholder representing this string in Change Name.
You can choose “String”, “Date” and “Amount” – or for more complex captures, you can use Regular Expression/RegEx.
See p. 252 of the manual (3.9.8 version); Appendix > Smart Rule Events and Actions > Actions > Item Scanning.
The DOI/Google Books Metadata scripts fetch metadata and puts it into Custom Metadata fields (only available in DEVONthink Pro and Server). Since Custom Metadata fields are available as placeholders, it is quite easy to use them for renaming
Using DEVONthink as a reference manager? That is a quite different and more complicated topic. I think it makes more sense to discuss in its own thread.
It depends on what you expect of a reference manager – and how much work you’re willing to put into learning how to script it. Potentially yes, more likely no. Dedicated reference managers exist for a reason.
I do remember reading some people here in the forum actually use it as a simple reference manager. Try and search around.
It has since been made officially available inside the app. You install it through the Support Assistant.
It will put a formatted reference in the “Finder Comments” field. The citation format can be customised – read the comments in the script itself. It is easy, you just change the line set CitationName to. There are different APA variants, so find the one you want in the link given in the script.