Sift by Overthinking LAMB

Variables

A variable is a placeholder in curly braces that Sift replaces with a value from the photo, such as {capture:%Y-%m-%d} or {iptc.city}. Use them to name files and folders, fill captions and build text.

{capture:%Y-%m-%d}_{camera.serial|snippet}_{seq:0001}.{ext|lower}

For a photo shot on 1 May 2026 that gives a name like 2026-05-01_Jane-Doe_0007.cr3.

Where you use variables

  • Import: the destination folder and file name templates. See Import.
  • Rename: the Name template in Rename photos.
  • Export: the Subfolder template and File name template. See Deliver.
  • Send: the destination folder. See Deliver.
  • Text exports: each column is a template with variables.
  • Metadata templates and snippets: text with variables filled in for each photo. See Caption.
  • Info text: what the loupe and the Detailed grid show, in Settings under Info text.

Wherever a template is typed, a live preview shows the result for the focused photo (“Preview for the focused photo”). The preview is exactly what the job will do, and it never uses up a counter. Mistakes are underlined and explained, for example “Unknown variable: …” or “This format doesn’t suit the variable: …”.

Write a variable

You write You get
text The text as it is
{{ and }} A literal { and }
{token} The value, in its default format
{token:format} The value in a format. Dates use date codes; numbers use a zero-pad sample
{token|filter|filter(arg, ...)} The value with filters applied left to right
{token:format|filter} Format first, then filters
  • Variable names are case-sensitive: write {iptc.city}, not {IPTC.City}.
  • A format runs up to the first | or }.
  • Filter arguments are numbers (pad(4)) or text in double quotes (default("n/a")). Use \" for a quote and \\ for a backslash inside text.
  • A mistake never stops the whole template. The rest still renders:
Mistake What happens
{ with no } before the next { or the end Kept as literal text
{} with no name Dropped
A } alone Kept as a literal }. Write }} to mean it.
Unknown filter That filter is dropped
Wrong arguments for a filter That filter is dropped
Another malformed filter, such as a missing ) or an unterminated quote That filter is dropped
Unknown variable Renders empty, with a warning
Invalid format Renders in the default format, with a warning

A known variable with nothing to show, such as the serial number of a camera that doesn’t record one, renders empty and silently.

Variable reference

Token Value Default format
filename File name with extension (IMG_0042.CR3) text
basename File name without its last extension (IMG_0042; .hidden stays whole) text
ext Last extension without the dot (CR3); empty when there is none text
folder Name of the folder holding the file text
path Full path of the file text
filesize Size in bytes number
capture Capture time (local, as the camera recorded it) %Y-%m-%d %H-%M-%S
capture.subsec Capture milliseconds 3 digits (045)
capture.display Capture time as the app shows it: 2026-05-01 18:04:59, plus .120 when the file has subseconds and −05:00 (U+2212 for minus) when it has an offset. Meant for on-screen text (loupe HUD, Detailed cells); it has : and so isn’t valid in Windows file names text
exposure The exposure line as the app shows it: the parts the file records, joined with · (1/2000 · f/2.8 · ISO 3200 · 400 mm), units localized. Meant for on-screen text; empty in import names text
camera.make · camera.model · camera.serial Camera body text
camera.owner Camera owner name: EXIF CameraOwnerName (0xA430), else Canon MakerNote OwnerName text
lens Lens model text
focal Focal length in mm, not 35 mm-equivalent (200, 4.5) one decimal, no .0
aperture f-number (2.8, 11) one decimal, no .0
shutter Exposure time (1/2000, 0.4, 2, 1.3) see below
iso ISO number
ev Exposure bias (+0.7, -1, 0) one decimal, signed
frame Camera file number 1–9999 (the 1234 of DSC_1234): Nikon MakerNote FileInfo FileNumber, or the last four digits of Canon MakerNote FileNumber; empty for bodies that don’t record it (most) number
width · height Pixel size as stored, before orientation number
megapixels width × height / 10⁶ (44.8) one decimal
orientation EXIF orientation value 1–8 number
gps.lat · gps.lon Position in signed decimal degrees, north and east positive, six places (-33.856784); empty when the photo has no position decimal, no format
gps.alt Altitude in meters above sea level, signed, one place (35.0); empty when none decimal, no format
geo.city · geo.state · geo.country · geo.countrycode Same as iptc.city, iptc.state, iptc.country, iptc.country_code text
rating Stars 0–5 number
label Color label name as the label preset spells it text
pick picked, rejected or unflagged text
seq The file’s number in the job: capture-time order across all cards of one import (ties: card order, then path) number
seq.session Session counter number
seq.<name> Named counter (remembered between jobs) number
card.label Card volume label text
card.serial Card’s persistent id text
import.date Local date and time the import started %Y-%m-%d
now Local time now, read once by the caller %Y-%m-%d %H-%M-%S
user.name · user.initials Identity from settings text
user.<name> Custom user variable text
iptc.<field> A descriptive field by its id (caption, city, creator_job_title, …; see the list below). Text as is (Alt-lang fields: the x-default value; date_created: the XMP date as stored, 2026-05-01T18:04:09); lists joined with , (keywords: the leaf of each path, Sports|Soccer → Soccer) text
iptc.creator_contact.<member> A Creator contact member: address, city, region, postal_code, country, phone, email, url text
iptc.location_shown.<member> · iptc.location_created.<member> A member of the first location: name, sublocation, city, state, country, country_code, world_region text

{iptc.creator_contact}, {iptc.location_shown} and {iptc.location_created} with no member have no single text value. They render empty with an unknown-variable warning, as does an unknown member or field name.

iptc.<field> accepts the descriptive field names, for example caption, headline, title, creator, credit, source, copyright, city, state, country, country_code, sublocation, keywords, instructions, job_id, event, person_shown, usage_terms, web_statement, caption_writer and creator_job_title. The aliases table below shows the field behind each familiar name.

The default date-time format uses - between the time fields, so it is valid in a file name on Windows.

shutter: below 1 second you get 1/n when the stored fraction reduces to it exactly or the time is under 0.3 s (rounded). Otherwise you get one decimal (0.4, 1.3, 30).

Job variables (seq, card.*, import.date) render empty in info text. Descriptive fields (iptc.*) come from the photo’s current metadata.

Formats

Dates (capture, import.date, now): a strftime subset.

Code Output Code Output
%Y 4-digit year %b Jan … Dec
%y 2-digit year %B January … December
%m month 01–12 %a Sun … Sat
%d day 01–31 %A Sunday … Saturday
%H hour 00–23 %p AM / PM
%I hour 01–12 %j day of year 001–366
%M minute %z UTC offset +0200; empty when the file has none
%S second %L milliseconds 000–999 (000 when unknown)
%% %

Weekday and day of year are computed from the date (proleptic Gregorian). Month and day names are always in English.

Numbers (seq*, frame, width, height, iso, filesize, rating, orientation, capture.subsec): the format is a zero-pad sample made of digits; its length is the minimum width. {seq:0001} → 0007. At most 255 digits.

Text (every text token): start,count takes count characters from character start (both unsigned, counting from 0), the Photo Mechanic substring format used by Hot Code generators (docs/snippets.md): {basename:0,3} → IMG, {fbas:4,4} → 0042. A start past the end gives an empty value.

Any other format (any other format on a text token, {seq:abc}, {capture:%Q}, a lone % at the end, a format on focal/aperture/shutter/ev/megapixels) is invalid: a warning, and the value renders in its default format. An empty format ({seq:}) is the default format.

Filters

All filters count characters, not bytes, and never split a character.

Filter Effect
upper · lower Unicode case mapping
title First letter of each whitespace-separated word upper case, the rest lower case (o'DOE → O'doe)
trim Removes leading and trailing whitespace
slug Lower case; Latin letters with diacritics folded to ASCII (ñ → n, ß → ss, œ → oe, ł → l); other letters and digits kept as they are (東京, москва); every other run of characters (spaces, punctuation, emoji) becomes one -, none at either end. Señora_Ñandú_東京 → senora-nandu-東京
pad(n) Left-pads with 0 to n characters (n capped at 255); a longer value is unchanged
truncate(n) Keeps the first n characters
default("x") x when the value is empty
replace("a", "b") Replaces every a with b; an empty a does nothing
first_word · last_word First or last whitespace-separated word
snippet Looks the value up as a snippet code, for example to turn a camera serial number into a photographer’s name; unchanged when no snippet matches or no snippets are loaded

Limits: a value never grows past 16 KiB after any filter, and rendered text stops at 64 KiB.

Info text

Settings has two Info text templates: the Loupe HUD, and the Detailed grid cell (first two lines). Write one line of text per line. A separator next to an empty variable does not show, because each line is trimmed. A blank field gets the default back. Defaults are {filename} over {exposure} {capture.display} for the HUD, and {filename} over {exposure} for the cell.

File and folder names

Names are always valid on Windows, Linux and macOS, whatever the destination, so your templates are portable. The preview shows the cleaned-up result.

  • Folder templates: only the / you type in the template starts a new level. A / or \ inside a value becomes _, so a value never creates a level. Levels that come out empty are left out. The result is always relative to the destination: it can never go above it.
  • File name templates make one name. A / in the template is replaced like any other forbidden character.
  • Each name is cleaned in this order:
    1. <, >, :, ", /, \, |, ?, * and control characters become _.
    2. Trailing dots and spaces are removed. A name left empty (also . and ..) becomes _.
    3. Windows device names get a _ after the name part: CON, PRN, AUX, NUL, COM0 to COM9, LPT0 to LPT9 and a few more. In any case, with or without an extension. nul.txt becomes nul_.txt.
    4. Names are cut to 255 bytes. A file name keeps its extension when it must be shortened.

Photo Mechanic variable aliases

Sift accepts Photo Mechanic variable names, so you can bring your templates over. Our own names win over aliases, and a format you write wins over the format an alias implies: {yr4:%m} gives the month.

Details can differ where Photo Mechanic doesn’t document its exact output (file size, focal length, aperture, shutter and sub-second formatting). Photo Mechanic’s date variables fall back to the file’s creation time when there is no capture time. In Sift they render empty, except in import names, where the preview says “No capture time: using the file’s date”.

Photo Mechanic Ours Camera Bits’ description (abridged)
{filename}, {file} {filename} Filename of photo with the extension
{filenamebase}, {fbas} {basename} Filename of photo without the extension
{folder}, {fldr} {folder} The folder name for a photo
{path} {path} The full path name of the photo
{filesize}, {size} {filesize} File size of the photo
{make} {camera.make} Make of camera that took photo
{model}, {modl} {camera.model} Model of camera that took photo
{serialnum}, {serial}, {snum} {camera.serial} Serial number of camera that took photo
{owner}, {ownr} {camera.owner} Camera’s owner (if defined)
{lenstype}, {lt} {lens} Type of lens used
{focallength} {focal} Focal length of lens in mm, not a 35 mm equivalent
{aperture}, {f} {aperture} Aperture setting of photo (from the EXIF data)
{shutter}, {ss} {shutter} Shutter speed setting of photo, from EXIF data
{iso} {iso} ISO (ASA) setting of photo
{comp} {ev} Exposure compensation set by camera
{frame}, {fnum} {frame} Frame number of photo
{width}, {w}, {x} {width} Width of image in pixels (prior to any rotation)
{height}, {h}, {y} {height} Height of image in pixels (prior to any rotation)
{rating}, {stars}, {rate} {rating} Star rating of photo
{sequence}, {seqn}, {auto} {seq} Current value of sequence variable, incremented for the next photo
{username}, {urna} {user.name} User name
{year4}, {yr4} {capture:%Y} Capture year (4 digits)
{year2}, {yr2} {capture:%y} Capture year (2 digits)
{month0}, {mn0} {capture:%m} Capture month zero padded (01 … 12)
{monthname}, {mnn} {capture:%B} Capture month name (January, February, etc)
{monthname3}, {mnn3} {capture:%b} Capture month name abbreviated (Jan, Feb, etc)
{day0} {capture:%d} Capture day zero padded (01 … 31)
{dow} {capture:%A} Capture day of week (Sunday, Monday, etc)
{dow3} {capture:%a} Capture day of week abbreviated (Sun, Mon, etc)
{hour0}, {hr0} {capture:%I} Capture 12 hour format zero padded (01 … 12)
{hour24}, {h24} {capture:%H} Capture 24 hour format zero padded
{minute}, {min} {capture:%M} Capture minute (00 … 59)
{second}, {sec} {capture:%S} Capture second (00 … 59)
{ampm} {capture:%p} Capture day half (AM or PM)
{datesort}, {dats} {capture:%Y%m%d} Capture date, always YYYYMMDD
{datesortdash}, {dtsd} {capture:%Y-%m-%d} Capture date, always YYYY-MM-DD
{timesortdash}, {tmsd} {capture:%H-%M-%S} Capture time, always HH-MM-SS
{subsecond}, {ssec} {capture.subsec} Capture sub-second
{now} {now} Current time
{todaysort}, {tdys} {now:%Y%m%d} Current date, always YYYYMMDD
{todayyear4}, {tyr4} {now:%Y} Current four digit year
{todayyear2}, {tyr2} {now:%y} Current two digit year
{todaymonth0}, {tmn0} {now:%m} Current zero padded month
{todayday0}, {tdy0} {now:%d} Current day zero padded
{todaymonthname}, {tmnn} {now:%B} Current month name
{todaymonthname3}, {tmn3} {now:%b} Current month name abbreviated
{todaydow}, {tdow} {now:%A} Current day of week
{todaydow3}, {tdw3} {now:%a} Current day of week abbreviated
{nowhour0}, {nhr0} {now:%I} Current 12 hour format zero padded
{nowhour24}, {nh24} {now:%H} Current 24 hour format zero padded
{nowminute}, {nmin} {now:%M} Current minute
{nowsecond}, {nsec} {now:%S} Current second
{nowampm}, {nap} {now:%p} Current day half (AM or PM)
{nowsort}, {nows} {now:%H%M%S} Current time, always HHMMSS in 24-hour format
{caption}, {capt} {iptc.caption} Caption
{captionwriter}, {cwrt} {iptc.caption_writer} Caption writer
{headline}, {head} {iptc.headline} Headline
{object}, {objt}, {slug} {iptc.title} Object name
{keywords}, {keyw} {iptc.keywords} Keywords
{instructions}, {inst} {iptc.instructions} Special instructions
{byline}, {name}, {photog}, {phtg} {iptc.creator} Byline (photographer)
{title}, {titl} {iptc.creator_job_title} Creator’s job title (byline title)
{credit}, {cred} {iptc.credit} Credit
{source}, {srce} {iptc.source} Source
{copyright}, {copy} {iptc.copyright} Copyright notice
{copyrighturl}, {curl} {iptc.web_statement} Copyright URL
{usage}, {usag} {iptc.usage_terms} Rights usage terms
{event}, {evnt} {iptc.event} Event
{persons}, {prsn} {iptc.person_shown} Persons shown in image
{transref}, {tref} {iptc.job_id} Transmission reference
{location}, {loc} {iptc.sublocation} Sublocation
{city} {iptc.city} City
{state}, {stat}, {province}, {prov} {iptc.state} State/province
{country}, {cnty} {iptc.country} Country
{countrycode}, {ccod} {iptc.country_code} Country code
{locationtaken}, {lctk} {iptc.location_created.sublocation} Sublocation taken
{citytaken}, {cttk} {iptc.location_created.city} City taken
{statetaken}, {sttk} {iptc.location_created.state} State taken
{countrytaken}, {cntk} {iptc.location_created.country} Country taken
{countrycodetaken}, {cctk} {iptc.location_created.country_code} Country code taken
{worldregiontaken}, {wrtk} {iptc.location_created.world_region} World region taken
{contactaddress}, {ciad} {iptc.creator_contact.address} Contact address
{contactcity}, {cicy} {iptc.creator_contact.city} Contact city
{contactstate}, {cist} {iptc.creator_contact.region} Contact state
{contactzip}, {cizp} {iptc.creator_contact.postal_code} Contact ZIP/postal code
{contactcountry}, {cicn} {iptc.creator_contact.country} Contact country
{contactphone}, {ciph} {iptc.creator_contact.phone} Contact phone
{contactemail}, {ciem} {iptc.creator_contact.email} Contact email
{contactweb}, {ciwb} {iptc.creator_contact.url} Contact web URL

Where a photo has several keywords, creators or persons, they are joined with , . Keywords use the last level of each path only.

Names that are not aliased

These Photo Mechanic names don’t work in Sift. Use the replacement in the table.

Photo Mechanic Why not
{lens} PM’s {lens} is the focal length; ours is the lens model. Use {focal} (or PM’s {focallength})
{pixels}, {pxls} Renders as a multiplier (4.1M); {megapixels} gives 4.1
{colorclass}, {color}, {colr} PM’s color class names (Winner, Superior, …) aren’t our label names unless the PM-style label preset is on
{tag} 1/0; our {pick} has three states
{ingestseq}, {iseq} Incremented per disk; no equivalent yet
{index}, {total} No equivalent yet
{frame4}, {lens35}, {lenstypenum}, {folderpath}, {parentfolderpath}, {rotation} No equivalent token yet
{month}, {day}, {hour}, {todaymonth}, {todayday}, {nowhour} Not zero-padded; the v1 strftime subset has no unpadded codes
{date}, {shot}, {time}, {today}, {tomorrow}, {yesterday} Follow the OS’s short date/time format
{datemil}, {todaymil}, {monthnameap}, {todaymonthnameap}, {wiredate} Military and AP styles: no equivalent format yet
{timesort}, {timesortlong}, {nowsortlong}, {nowsubsecond} Exact output not documented, or hundredths of the current time
{moddate}, {modtime}, {moddatesort}, {modtimesort} File modification time: no token yet
{usercompany}, {useremail}, {jobname}, {usercustom1}–{usercustom3} Use custom {user.<name>} variables
{alttext}, {alttextalt}, {extendeddesc}, {category}, {genre}, {subject}, {scene}, {suppcat1}–{suppcat3}, {urgency}, {editstatus}, {mining}, {identity}, {imagesupplierid}, {imagesupplierimageid}, {imagesuppliername}, {modelages}, {modelinfo}, {modelreleaseid}, {locationidtaken} (and their short forms) IPTC fields outside our field set
{sourcetype}, {srct} Digital Source Type is not a {iptc.*} field
{iptcdate}, {iptctime}, {iptcyear4} and the other iptc… date parts PM renders IIM 2:55/2:60 parts; our {iptc.date_created} is the XMP date. No date format on it yet
Client and Getty variables No equivalent

See also