Tokens

Top  Previous  Next

The following tokens can be used in the thumbnail caption, email subject, email text and in text messages.

 

General tokens
 

%a

Abbreviated weekday name

e.g. Fri

%A

Full weekday name

e.g. Friday

%b

Abbreviated month name

e.g. Jun

%B

Full month name

e.g. June

%d

Date in the form YYMMDD (equivalent to %y%m%D)

e.g. 150617 for June 17, 2015

%D

Day of the month (01 to 31)

 

%H

Hour (00 to 23)

 

%I

Hour (01 to 12)

 

%j

Day of the year (001 to 366)

 

%l

Long date/time representation of locale

e.g. Monday, January 17, 2015 19:03:47

%L

Long date representation for locale

e.g. Monday, January 17, 2015

%m

Month (01 to 12)

e.g. 06 for June

%M

Minutes (00 to 59)

 

%p

am/pm indicator

e.g. PM

%S

Seconds (00 to 59)

 

%t

Time in the form HHMMSS (equivalent to %H%M%S)

 

%W

Week number (00 to 53)

 

%x

Date representation for locale

e.g. 06_17_15 for June 17, 2015

%X

Time representation for locale

e.g. 14_39_29

%y

Year without century

e.g. 11

%Y

Year with century

e.g. 2015

%z

Time zone name

e.g. GMT Standard Time

%Z

Time zone offset wrt UTC

e.g. +0100 for GMT during DST

{yearNow}

Year 'now' in the form YYYY

e.g. 2015

{monthNow}

Month 'now' (01 to 12)

e.g. 03

{dayNow}

Day 'now' (01 to 31)

e.g. 05

{yearLess8h}

Year with century 8 hours ago - useful when shooting events which continue after midnight

e.g. 2015

{monthLess8h}

Month (01 to 12) 8 hours ago - useful when shooting events which continue after midnight

e.g. 12

{dayLess8h}

Day of the month (01 to 31) 8 hours ago - useful when shooting events which continue after midnight

e.g. 31

{filename}

The filename of the image without the file extension or folder path

e.g. image1 for D:\Photos\image1.jpg

{filename1}, {filename2} ... {filename9}

Extracts a portion of the filename string delimited by space, - or _

e.g. {filename2} gives two for D:\one_two_three.jpg

{fullFilename}

The filename of the image with the file extension but without the folder path

e.g. image1.jpg for D:\Photos\image1.jpg

{fileExt}

The file extension

e.g. jpg for D:\Photos\image1.jpg

{uid}

Extracts a UID in the form ABC12345 or ABCDE123 from the filename or returns [UID not found]

e.g. 20190621_HDTUW345.jpg gives HDTUW345

{subfolder}

Extracts the name of the parent folder of the file

e.g. 20160718 for C:\Photos\20160718\IMG_0001.JPG

{eventName}

The event name read from the event info


{eventString1} to {eventString5}

Event strings read from the event info


{urlencode,str}

Encodes str so that it can be used as a parameter in a URL e.g. when providing a URL for a microsite

https://yoursite.com/viewer.php?id={urlencode,my name} gives https://yoursite.com/viewer.php?id=my%20name

{hulaencode,str}

Converts str to lower case and replaces characters which aren't letters or digits with - to make it easier to link to galleries in Hula Gallery

John and Sue Wedding gives john-and-sue-wedding

 

Tokens for modifying strings

 

The tokens below can be used to modify tokens or strings:

 

Token

Description

Example

{left,n,str}

Extracts the first n characters from str (which can be a string or token).

{left,4,{filename}} for D:\Photos\image1.jpg will give: image

{mid,n,m,str}

Extracts m characters starting from the n'th character from str (which can be a string or token).

{mid,1,3,{filename}} for D:\Photos\image1.jpg will give: mag
{mid,3,,{filename}} for D:\Photos\image1.jpg will give: ge1

{right,n,str}

Extracts the last n characters from str (which can be a string or token).

{right,2,{filename}} for D:\Photos\image1.jpg will give: e1

{field,n,str}

Extracts the nth field from str. Fields are separated by space, period, comma, hyphen or underscore characters

{field,2,{filename}} for D:\Photos\one_two_three.jpg will give: two

{field2,n,ch,str}

Extracts the nth field from str using the character ch as the field separator

{field2,2,-,one-two-three} will give: two

{first,str}

Extracts the first word from str (which can be a string or token).

{first,%L} for an image taken Monday, January 17, 2015 will give: Monday

{last,str}

Extracts the last word from str (which can be a string or token).

{last,%L} for an image taken Monday, January 17, 2015 will give: 2015

{upper,str}

Converts str to upper case

{upper,%B} for a photo taken in June gives: JUNE

{lower,str}

Converts str to lower case

{lower,%B} for a photo taken in June gives: june

{capitalize,str}

Converts str to lower case and capitalizes the first letter

{capitalize,john} gives John

{default,str1,str2}

Returns str1 unless it is an empty string in which case it returns str2 (str1 and str2 can be strings or tokens

{default,1,2} returns 1
{default,,2} returns 2

{if,test,str1,str2}

Returns str1 if test is not an empty string else returns str2 (test, str1 and str2 can be strings or tokens)

{if,1,2,3} returns 2
{if,,2,3} returns 3

{compare,str1,str2}

Returns 1 if str1 is the same as str2 else returns an empty string

{compare,photo,photo} returns 1, {compare,photo,image} returns empty string

{contains,str1,str2}

Returns 1 if str1 contains str2 else returns an empty string

{contains,photo,to} returns 1, {contains,photo,camera} returns empty string