Copy File

Purpose

Copies one or more files from one folder to another.

File Copy Node

Usage

The File Copy node attempts to copy a file from one location, in your customer area on Paygate, to a destination location, also in your customer area.

Once successfully copied the workflow continues down the ‘continue’ path to the next node.

If there are any errors during the copy process then the workflow will flow down the error path.

File Copy Node config

Filename

The name of the file(s) that will be copied. This can be either:

Please note: As indicated in the node configuration popup, filenames and paths are case sensitive. MyPayments.txt is treated as a different file to mypayments.txt.

Wildcards

Standard * and ? wildcards are fully supported allowing you to copy all files matching a particular wildcard pattern.

The node can also use more advanced wildcards such as those based around ranges: […]

Wildcard Description Example Matches Does not match
* matches any number of characters myfile.txt myfile.txt or myfile.csv myfile1.txt
? matches a single character myfile?.txt myfile1.txt myfile22.txt
[abc] matches one of the characters provided [pf]ile.txt file.txt, pile.txt mile.txt
[a-z] matches one character from the range provided myfile[0-9].txt myfile1.txt, myfile2.txt myfile10.txt

Additionally use can use the ! character to apply ‘not’ logic

Wildcard Description Example Matches Does not match
[!abc] matches one of the characters NOT provided [pf]ile.txt mile.txt file.txt
[!a-z] matches one character NOT from the range provided myfile[0-9].txt myfilea.txt, myfile22.txt myfile1.txt

From Path

The logical path of the directory containing the file to be copied. You can use the folder browser functionality to set the path if required.

To Path

The logical path to the file from the root of your customer folder on Paygate. You can use the folder browser functionality to set the path if required.

Tokens

Special tokens can be used in the path and filename fields to allow them to be dynamically named. For example: MyReport-21-09-2025.csv

Token Meaning Example
{dd} Current Day number 12
{MM} Current Month Number 03
{yy} Current Year (2d) 25
{yyyy} Current year (4d) 2025
{hh} Current Hour (24hr) 07
{mm} Current Minute 45
{ss} Current Second 22
{SSS} Current Millisecond 123

For example, at the time of writing: MyFolder-{dd}-{MM}-{yyyy}

would result in a folder name of: MyFolder-14-03-2025

Overwrite existing file

If checked, the workflow will overwrite any existing files, with the same name, in the ‘to path’ directory. If unchecked, the workflow will leave intact any existing files in the ‘to’ folder path with the same name.

Follow error path if no matching files found

If selected, if no matching file is found, the node will be deemed to have failed and the error path will be followed. The logs will show the node completed in an error state.

This behaviour can be used to create different workflow paths if, for example, a file is not found.

In the default (off) state the node will always follow the ‘Success’ path, whether a match file was found (and processed) or not.