Copy File
Audience:
Business UsersSkill 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
- Copy a whole folder. Use Pack folder and Unpack an archive, or Move Folder if you don't need to keep the original.
- Copy a file under a new name in one step. Copy it, then use Rename File on the copy.
Related Actions
| Action Name | Description |
|---|---|
| Rename File | Renames the copied file. |
| Delete File | Deletes the original file after copying it. |
| Get or Create Folder | Creates a destination folder and returns its path as a token. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| File Identifier | The file to copy. Select a file from the list, or switch to expression mode and enter one of the supported file identifiers. | Yes | none selected | Yes |
| Destination Folder Identifier | The 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. | Yes | none selected | Yes |
| Ignore errors | When 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. | No | Unchecked | No |
Supported file identifiers
| Format | Example |
|---|---|
| File ID | 77 |
| Path relative to the portal root | Images/Cars/Ford.jpg |
| Path that includes the portal folder | Portals/0/Images/Cars/Ford.jpg or /Portals/0/Images/Cars/Ford.jpg |
| Absolute URL of a file on the site | https://example.com/Portals/0/Images/Cars/Ford.jpg |
| LinkClick URL | /LinkClick.aspx?fileticket=... |
| Physical path inside the portal folder | C:\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
| Parameter | Description |
|---|---|
| Output Token Name | The 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:
| Token | Description |
|---|---|
[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 errorsis checked. - The copy gets the permissions of the destination folder, not of the original folder.
Examples
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