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.

Variable NameRequired · lowercase · 2–20 characters · becomes the {token}

The variable's name, and the token you'll type in a pattern. Lowercase letters, numbers, and underscores; it must start with a letter.

ExampleNaming it “ccpc” makes it available as {ccpc}.
DescriptionOptional · up to 200 characters

A note shown when picking variables, describing what this one produces.

Example“Defines the first variable for the CCPC naming convention.”
Combine ModePriority (Fallback) / Concatenate / Fill to Length / Distributed · default Priority (Fallback)

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.

ExampleWith sources artist then lastname, a photo tagged with the artist “Ansel Adams” resolves to “ANSEL ADAMS”. A scan with no artist but a lastname of “Lange” skips the empty first source and falls back to “LANGE” — the first source holding a value always wins.

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.

ExampleWith sources lastname:3 then firstname:1, photographer “Smith, Jane” adds the first three letters of the surname (“Smi”) followed directly by the first letter of the given name (“J”), giving the four-letter byline “SMIJ”.

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.

ExampleWith one source lastname and a Target Length of 5, the two-character surname “Li” is padded to “LI___”, while the longer “Petersen” is trimmed to “PETER” — every code ends up five characters wide.

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.

ExampleWith sources lastname then firstname and a Total Length of 4, photographer “Anthony Li” lets the surname “Li” take its two characters and carries the remaining two over to the given name “An”; with the default placement this packs both into the four-character code “LIAN”.

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.

Source VariablesOrdered list · per-source truncate :N and case

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.

Examplelastname:4 then firstname:4 sets the order lastname → firstname.
Target Length1–20 characters · Fill to Length mode

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.

ExampleTarget Length 5 pads the combined value “Li” out to “Li___” so every code is five characters.

Appears in the editor only when Combine Mode is set to Fill to Length.

Total LengthUnlimited / Maximum · default Unlimited · 1–50 characters; required for Distributed

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).

ExampleIn Concatenate mode with Maximum set to 6, a combined byline of “SMITHFIELD” (ten characters) is trimmed to its first six, “SMITHF”; left on Unlimited, the full “SMITHFIELD” is kept.

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).

Secondary PlacementAfter Primary (Suffix) / Before Primary (Prefix) · default After Primary (Suffix)

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.

ExampleWith surname “Li” (primary) and first name “An” (secondary): After Primary (Suffix) keeps the first name after the surname → “LIAN”, while Before Primary (Prefix) places the first name before the surname → “ANLI”.

It has no effect in the other combine modes, where source order alone fixes the arrangement.

Case TransformationMixed / Uppercase / Lowercase · default Uppercase

Case applied to the finished value.

ExampleUppercase yields “KEXU” rather than “KeXu”.
Fallback ValueSingle character · no default

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.

ExampleSet to “?”, a file missing both names previews as “????”.

Managing Templates

Review an existing variable

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.

Create a new variable

Add a variable, name it, and assemble its sources. The Live Preview updates as you go.

  1. Click New to start a variable.
  2. Name it — this becomes the {token}.
  3. Add source variables and set their truncation and order.
  4. Choose a combine mode, total length, placement, and case.
  5. Check the Live Preview, then save.
Edit, duplicate, and delete

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.

Import and export

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.