How to Use Filing and Moving
In a previous blog post on smart rules, we discussed how to organize DEVONthink documents in an automated fashion. In this post we briefly touched on the File action, but some people have wondered why not just use the Move action. Here’s the difference between the two.
The critical difference between the Move and File actions is this: Move is for static locations; File is for dynamic locations. Let’s unpack that a little more.
With the Move action, you will choose the specific location to move the matched item to. For example, you can select a group in a different database as the destination for the matched item. This is very useful for moving documents into known locations with static names.
With the File action, you can also target a specific location, but you define it by providing a location’s path, e.g., /Inbox/For Support
, which would file items into a For Support
group in the Inbox of the database. If the defined groups do not exist yet, they will be created when applying the rule. To file into the root of the database, make sure you put a /
at the beginning of the location. If you don’t, the filing will be done in subgroups of the location of the matched item.
Where File actions really shine is when used with placeholders. In the article mentioned in the opening of this article, the placeholders for Year
, Month
, and Day
were used to dynamically create the location /2022/08/02
in the root of the database. When run a day later, an 03
group will be created in the 08
group inside the 2022
group. So each day the smart rule runs, a new group will be generated for you while existing groups will not be redundantly created.
If you are using the Pro or Server edition of DEVONthink, you’ll have access to custom metadata. Custom attributes you define can be used as a placeholder as well. Imagine you are running a business and have a Vendor
and an Accounts
attribute defined. You could use a File action such as /Year/Vendor/Accounts
to automatically file items into a per-vendor accounts payable or receivable group per year.
On a last note, one thing you can’t do with the File action is target a different database. However, you can use a Move action to move an item to a specific database first. Then use a File action to move it to the specific location.