Settings
Settings: Custom Variables
Create user-defined variables with source chaining and formatting options
Overview
Custom Variables are reusable building blocks for filename patterns. Each one combines one or more source metadata variables — with optional truncation, casing, and a combine rule — into a single variable you can drop into any Filename Template.
Once defined, a custom variable is available in patterns by its name in braces (for example {ccpc}). This tab lists your variables; selecting one shows how it's built and a live preview.
When to Use
Reach for Custom Variables when a naming part is more than a single metadata field — when it has to be built by combining or reshaping values — and you do not want to recreate that recipe in every template that needs it. A custom variable lets you define the building block once and then drop it into any filename pattern by name, so the logic lives in one place and every template stays in step. It earns its keep wherever the same derived part recurs across your work: a fixed-width photographer code drawn from a name, a project identifier that fuses a client and a job, or an event marker that pairs a date with a location. Define it here and it behaves identically everywhere it is used; change the definition and every template that references it updates at once. The Combine Mode card below explains the ways sources can be merged.
Requirements
- Variable name must be 2-20 characters, using lowercase letters, numbers, and underscores only
- Variable name must start with a letter (not number or underscore)
- Variable name cannot match reserved names: artist, firstname, lastname, yyyy, mm, dd, seq, etc.
- At least one source variable must be defined
- Source variable truncation length must be 1-20 characters if specified
- Custom variables must be created in Settings before they can be used in Filename Templates
- Variable names must be unique (case-insensitive) across all custom variables
Template Fields
Each field in the template editor, and how it shapes what the template produces.
The variable's name, and the token you'll type in a pattern. Lowercase letters, numbers, and underscores; it must start with a letter.
A note shown when picking variables, describing what this one produces.
How the values from the source variables are combined into the single value this custom variable produces. The four modes work very differently:
Priority (Fallback) reads the sources as a preference list: it takes the value of the first source that actually has one and ignores the rest, so the later sources serve purely as fallbacks for files where an earlier source is blank. Only the winning source contributes, with its own truncation and case applied. If none of the sources has a value, the variable falls back to its Fallback Value when one is set, and otherwise resolves to nothing for that file.
Concatenate joins every source together in the order listed, back-to-back, with nothing inserted between them — no separator and no padding. Each source keeps its own optional truncation (such as lastname:3) and its own case, so you control exactly how many characters each one adds. A source with no value simply contributes nothing, unless a Fallback Value is set to stand in for it.
Fill to Length joins the sources together back-to-back, then pads the combined value out to a fixed Target Length with the padding character (an underscore by default) so every result is exactly the same width. A value that already meets or exceeds the Target Length is trimmed back to it instead of padded, which is what keeps short and long codes aligned in even columns.
Distributed shares one fixed character budget — the Total Length — across the sources. The primary (first) source draws from the budget first, taking only as many characters as its value needs; whatever it leaves unused carries over to the next source, and so on down the list. Secondary Placement decides whether the carried-over characters are added after the primary value or before it, and the finished value never exceeds the Total Length.
Target Length appears only for Fill to Length; Total Length is required for Distributed and is an optional cap for the other modes; Secondary Placement appears only for Distributed.
The metadata variables that feed the custom variable, in order. Each can be truncated to a length (lastname:4) and given its own case. At least one is required.
For Fill to Length, the total output length after the sources are combined. A combined value shorter than this is padded with the padding character to reach it.
Appears in the editor only when Combine Mode is set to Fill to Length.
An optional cap on how long the finished value can be. The control starts on Unlimited — the value can be any length — or you can switch it to Maximum and set a number from 1 to 50, after which any longer result is trimmed to that many characters, keeping the start of the value and dropping the rest. Distributed mode is the one exception: there the toggle is replaced by a required length, because Total Length doubles as the shared character budget the sources are distributed across (described under the Distributed combine mode above).
Distinct from Target Length: Target Length pads a Fill to Length result up to a width, while Total Length caps the finished length (and, in Distributed mode, sets the shared budget).
Used only in Distributed mode, this sets where the secondary sources sit relative to the primary source in the combined value. After Primary (Suffix), the default, appends the secondary sources after the primary; Before Primary (Prefix) puts them ahead of it. The same inputs read very differently depending on the choice.
It has no effect in the other combine modes, where source order alone fixes the arrangement.
Case applied to the finished value.
For Fill to Length and Distributed, the character repeated for sources that are missing, filling out the length. Left unset, missing sources simply contribute nothing.
Managing Templates
Select a variable to see its combine mode, source variables, options, and a Live Preview showing the value with and without metadata. The token form ({name}) is shown so you know what to type in a pattern.
Add a variable, name it, and assemble its sources. The Live Preview updates as you go.
- Click New to start a variable.
- Name it — this becomes the {token}.
- Add source variables and set their truncation and order.
- Choose a combine mode, total length, placement, and case.
- Check the Live Preview, then save.
Select a variable, then Edit to change how it's built, Duplicate to start a new one from a copy, or Delete to remove it. A variable a template references should be updated rather than deleted so existing patterns keep resolving.
Export writes the selected variable to a file you can share or back up; Import adds variables from a file. Imported variables arrive as new, editable copies.
Tips & Important Notes
- Use descriptive lowercase names like 'photographer', 'clientcode', or 'eventname'. Avoid abbreviations that are unclear to other users.
- 'Priority (Fallback)' mode builds fallback chains. {lastname:4|artist:4} tries lastname first and uses artist if it is empty; the chain continues until a non-empty value is found or the fallback value is used.
- 'Concatenate' mode joins all source values. Sources {firstname:1}{lastname:3} produce 'JDoe' from 'John' + 'Doe'. All sources must have values for the expected result.
- 'Fill to Length' pads to an exact length. A target of 4 with {lastname:4} and padding '_' turns 'Li' into 'Li__' (suffix) or '__Li' (prefix). Useful for fixed-width filename patterns.
- 'Distributed' fills the primary source up to the total length, then carries the unused remainder to the secondary sources - handy for fixed-width codes built from more than one field.
- Apply truncation at the source for component truncation ({lastname:4} = 'SMIT' from 'Smith'). Use Total Length to trim the final output after combining.
- Case transformation applies to the final result after combining. Uppercase suits code-style names; Mixed Case keeps the original case from the metadata.
- You cannot reuse built-in variable names like 'artist', 'yyyy', or 'seq'. The editor validates names and shows errors for conflicts.
- Define a variable once and use it in multiple templates. Change the variable definition to update every template that uses it.
- In 'Priority (Fallback)' mode, source order matters. Put the most reliable or preferred source first; each source is tried in order until a non-empty value is found.
- The fallback value provides a default when all sources are empty. Use descriptive values like 'UNKN' or 'MISC' that are recognizable in filenames.