Path Variables
This page describes variables that are available for paths in Organization Rules.
Dirk provides a number of built-in variables that you can use in the various rule fields. These variables allow you to more intelligently organize your files.
Destination Variable List
The following table documents the variables that are available in the Destination fields of a Move Rule.
In the examples below, we are assuming the following:
-
The Repository’s base path is located at C:\Photos
-
The full path for the file that is being moved is located at C:\Photos\one\two\three.txt:
Variable | Description (for example path: C:\Photos\one\two\three.txt) | Example Output |
---|---|---|
{RepoBase} | The base path of the current repository | C:\Photos |
{OriginalFilename} | original filename of the source file (including the original file extension) | three.txt |
{OriginalNameOnly} | original filename of the source file (without the original file extension) | three |
{OriginalExtension} | original filename of the source file (without the original file extension) | txt |
{OriginalDirectoryName} | name of the directory containing the source file | two |
{OriginalDirectoryPath} | full path of the directory containing the source file | C:\Photos\one\two |
{CreateYear} | year the file was created. Attempts to derive this from file’s metadata if available, otherwise uses the file’s creation date from the underlying file system (4 characters) | 2020 |
{CreateMonth} | (2 characters): month the file was created. Attempts to derive this from file’s metadata if available, otherwise uses the file’s creation date from the underlying file system | 12 |
{CreateDay} | (2 characters): day the file was created. Attempts to derive this from file’s metadata if available, otherwise uses the file’s creation date from the underlying file system | 31 |
{FileCreateYear} | (4 characters): year the file was created. Does NOT attempt to derive this from file’s metadata, always uses the file’s creation date from the underlying file system | 2019 |
{FileCreateMonth} | (2 characters): month the file was created. Does NOT attempt to derive this from file’s metadata, always uses the file’s creation date from the underlying file system | 11 |
{FileCreateDay} | (2 characters): day the file was created. Does NOT attempt to derive this from file’s metadata, always uses the file’s creation date from the underlying file system | 30 |
Example:
{RepoBase}\Organized\{OriginalNameOnly}-{CreateYear}-{CreateMonth}-{CreateDay}.{OriginalExtension}
expands to:
C:\Photos\Organized\three-2020-12-31.txt