Customizing Destination Filenames
When setting up Destination filenames in Automations, you may include pattern characters that will be substituted with values related to the Automation's run.
This is a reference of the available patterns to use for substitution.
If you are creating an automation to Copy or Move files, the destination path determines where files will be copied, moved, or created. It has the capability to include formatting parameters like below, which can dynamically determine the destination at runtime.
When a destination path starts with
../, it is treated as a relative path. In all other cases, it is interpreted as an absolute path.
When a destination path ends with a
/, it is recognized as a folder name, and the original filename is retained. On the other hand, if the destination path does not end with a
/, the destination field serves as a replacement for the filename.
These apply only if the Automation trigger is a File Action, and refer to the filename of the triggering File Action:
%tp- entire path of triggering File
%tf- filename of triggering File (without folder name)
%td- folder name of triggering File (without file name)
If the Automation trigger is an Inbound Webhook, any GET or POST parameters that are sent to that Webhook can be used by name. Parameters are limited to 190 characters in length each and 550 characters in length total.
%u-[GET or POST Param name] - will be replaced by the value sent in that GET or POST parameter to the Inbound webhook. For example, if the inbound webhook received parameter username, replacement pattern
%u-username could be used.
These apply based on the source path of the Automation. Remember that source paths can include wildcard characters, so this is how you would convert those wildcards in the source into something meaningful in the destination.
%p1- right-most folder component of matching source path
%p2- second right-most folder component of matching source path
%p3- third right-most folder component of matching source path
These are always available and use the time associated with the run time of the automation. These values are similar to the values used by the
strftime function in most standard code libraries.
%a- abbreviated weekday name (eg
%A- full weekday name (eg.
%b- abbreviated month name (eg.
%B- full month name (eg.
%C- century number (the year divided by 100, range
%d- day of the month (
%e- day of the month (
%H- hour, using a 24-hour clock (
%I- hour, using a 12-hour clock (
%j- day of the year (
%m- month (
%M- minute (
pmaccording to the given time value
%r- time in am and pm notation
%R- time in 24 hour notation
%S- second (
%T- current time, equal to
%u- weekday as a number (
7), Monday is represented as
%U- week number of the current year, starting with the first Sunday as the first day of the first week
%V- The ISO 8601 week number of the current year (
53), where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week
%W- week number of the current year, starting with the first Monday as the first day of the first week
%w- weekday as a number (
6), Sunday is represented as 0.
%y- two-digit year without a century (range
%Y- four-digit year including the century
%Z- time zone or name or abbreviation
%%- a literal
For automation types like Copy or Move files, you can search for specific text in the destination file name and replace it with your preferred text. For instance, you can configure the Move or Copy files automation to find all destination file names containing the text Reviewed and replace it with the text Final; then, any destination file name containing the text Reviewed (e.g., Invoice-Reviewed.pdf) will be renamed to Invoice-Final.pdf. Keep in mind that the search is case-sensitive, and wildcards are not supported.
Get Instant Access to Files.com
The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.Start My Free Trial