Skip to main content
Version: 1.28 (Current)

Copy File

Audience: Business Users

Skill Prerequisites: Tokens

Copies a file into another folder. The copy keeps the original file name. If the destination folder doesn't exist, it's created. Details of the new file, such as its ID and URL, can be saved as tokens for use by the actions that follow.

Typical Use Cases​

  • Copy an uploaded file from the upload folder into a record-specific folder
  • Copy a template (for example a Word or Excel file) before filling it in, so the original stays untouched
  • Copy a generated document into a public folder so it can be shared by URL
  • Move a file, by copying it and then deleting the original with Delete File

Don't use it to​

Action NameDescription
Rename FileRenames the copied file.
Delete FileDeletes the original file after copying it.
Get or Create FolderCreates a destination folder and returns its path as a token.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
File IdentifierThe file to copy. Select a file from the list, or switch to expression mode and enter one of the supported file identifiers.Yesnone selectedYes
Destination Folder IdentifierThe folder to copy the file into. Select a folder from the list, or switch to expression mode and enter a folder path relative to the portal root (for example Clients/[Company]/). Missing folders are created.Yesnone selectedYes
Ignore errorsWhen checked, errors such as a missing source file are written to the site's event log and the remaining actions keep running. When unchecked, an error stops execution.NoUncheckedNo

Supported file identifiers​

FormatExample
File ID77
Path relative to the portal rootImages/Cars/Ford.jpg
Path that includes the portal folderPortals/0/Images/Cars/Ford.jpg or /Portals/0/Images/Cars/Ford.jpg
Absolute URL of a file on the sitehttps://example.com/Portals/0/Images/Cars/Ford.jpg
LinkClick URL/LinkClick.aspx?fileticket=...
Physical path inside the portal folderC:\inetpub\site\Portals\0\Images\Cars\Ford.jpg

For files uploaded through a Single File Upload field, the field's [FieldName:FileId] token is a convenient identifier.

Output Parameters Reference​

ParameterDescription
Output Token NameThe name of the token that stores details of the copied file. See the tokens in the next table.

If Output Token Name is Copy, the following tokens are created:

TokenDescription
[Copy]The file ID of the copy.
[Copy:FileId]The file ID of the copy.
[Copy:AbsoluteUrl]The absolute URL of the copy, for example https://example.com/Portals/0/Clients/Acme/Ford.jpg.
[Copy:RelativeUrl]The URL of the copy relative to the site root, for example /Portals/0/Clients/Acme/Ford.jpg.
[Copy:PhysicalPath]The physical path of the copy on the server.
[Copy:LinkClick]A LinkClick URL that downloads the copy.

Considerations​

  • Existing files are overwritten. If a file with the same name already exists in the destination folder, it's replaced by the copy.
  • The source file must be inside the current portal. The action fails if the source file can't be found, unless Ignore errors is checked.
  • The copy gets the permissions of the destination folder, not of the original folder.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Copy an uploaded file into the customer's folder​

This action copies the file uploaded in the Contract field into Clients/<Company>/Contracts/ and saves the new file's details in the ContractCopy token.

{
"Title": "Copy File",
"ActionType": "CopyFile",
"Description": "Copy the uploaded contract",
"Condition": null,
"Parameters": {
"OriginalFile": {
"Expression": "[Contract:FileId]",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"DestinationFolder": {
"Expression": "Clients/[Company]/Contracts/",
"Value": "",
"IsExpression": true,
"Parameters": {}
},
"IgnoreErrors": false,
"OutputTokenName": "ContractCopy"
}
}

After this action runs, [ContractCopy:AbsoluteUrl] can be used in an email, and [ContractCopy] can be stored in a database table.

Revised 09/25/2026