Organization Rules

Read this section to learn how to configure Organization Rules to organize your Repository’s files

This section documents the Organization Rules that you can define within Dirk and how to configure them.

Organization Rules allow you to define rules that will allow Dirk to automatically organize the files and folders that are contained within your Repository. There are several types of rules that you can define, each with their own functionality that will allow you to organize your files in very flexible ways:

  • Ignore Rules: Ignore rules allow you to define patterns for files that should NOT be processed in any way by Dirk. Once a file has been ignored by an Ignore Rule, it is essentially “invisible” to any other rule that you define.

  • Move Rules: Move rules allow you to rename or move files from one location to another. Dirk has powerful facilities that allow you to move files to locations based on the content of the file, or metadata associated with it. For example, you can create rules to move and rename files to folders based on when the original file was created, or even based on the data that the camera captured when the original photo was taken (the so-called “EXIF” metadata).

  • Deduplicate Rules: Deduplicate rules allow you to keep your storage clean of duplicated files. Specify locations where you want files to remain, and Dirk can automatically find and remove any remaining duplicates.

  • Clean Rules: Clean rules allow you to clean up remaining areas of your storage, after all of the other rules have been processed. For example, you can specify rules that will automatically delete any empty folders that are found.

In this page, we will be using Dirk’s internal Rules Editor to view and configure the rules. Internally, this modifies hidden files within your repository where the rules are retained. While the internal Rules Editor exposes most of the functionality for modifying these files, there may be some cases where you will want to modify them manually instead. See this page for documentation about the format of these files.

Rule Hierarchy

First, it is important to understand how Dirk processes the Organization Rules that you configure in relation to the location where they are defined.

Consider the following folder hierarchy:

Rule Hierarchy Example

You can define rules in any of these folders. However, where you define them affects the files that will potentially be included in any Organization Operations that occur.

Rules defined in a folder apply to that folder and also ALL FOLDERS that are descended from it.

So in the above hierarchy, where the “Work” folder is the root of the Repository:

  • Work: rules defined in the top-level Work folder will be global to the entire repository because all of the other folders are descended from it.

  • dump: rules defined in the dump folder will apply to the dump, 2020, and iphone folders. Files and folders that are descended from the Saved folder will NOT be affected by these rules.

  • phone: rules defined in the phone folder will apply ONLY to that folder.

This flexibility allows you to define rules as granularly as you want.

Match Patterns

Folder Match Patterns

When you configure any of the Organization Rules, you will need to specify the Locations and File Types that are valid for the rule that you are defining.

When specifying valid Locations, there are a few ways that you can restrict or include folders that will be included. For example:

  • phone: This will match any folder named phone in the folder where the rule is defined, or any of its descendants.

  • phone*: This will match any folder whose name BEGINS with phone in the folder where the rule is defined, or any of its descendants.

  • /phone: Folders with a leading slash indicate that the folder must be a direct child of the folder where the rule is defined. This effectively disables recursively searching for the pattern in deeply-nested descendants.

You can provide nested patterns as well:

  • dump/phone: This will match any folder named phone that is a child of a folder named dump.

  • /dump/phone: This will match any folder named phone that is a child of a folder named dump - providing that the dump folder is a direct child of the folder where the rule is defined.

You can also include wildcards as folders:

  • dump/*/phone: This will match any folder named phone that is a child of a folder that is itself a direct child of a dump folder. Example: dump/2020/phone

  • dump/**/phone: This will match any folder named phone that is a child of a folder that is itself descended from a dump folder. Note that the double asterisks indicate that the search for phone from dump will be recursive. Example: dump/2020/04/phone

File Match Patterns

File Types use normal wildcard patterns. For example:

  • *.jpg: This will match all files that end with .jpg.

  • MoveMe.doc*: This will match all files whose name start with *MoveMe* and end with *.doc*. Example: *MoveMe-Please.doc*

Internal Rules Editor

To add or modify rules for a folder, click the Edit Folder Rules button in the Repository Snapshot screen of your repository:

Access the internal Rules Editor

Remember that this will allow you to modify rules within the folder that is currently visible in the Repository’s File Browser. If you wish to modify rules in a different folder, you can browse to that folder within the File Browser before clicking the Edit Folder Rules button.

After you click this button, the Rules Editor will appear. This editor has tabs that allow you to modify the rules for the various types of rules that are available:

Internal Rules Editor


Select from the links below for more information about the individual Rule sections of the editor:

Rules Precedence

Read this section to learn about the order in which rules are processed

Rules Editor

Read this section to learn how to configure Organization Rules to organize your Repository’s files