Copy

STD.File.Copy( sourceLogicalName, destinationGroup , destinationLogicalName, [ ,sourceDali ] [ ,timeOut ] [ ,espServerIPPort ] [ ,maxConnections ] [ ,allowOverwrite ] [ ,replicate ] [ ,asSuperfile ] [ ,compress ] [ ,forcePush ] [ ,transferBufferSize ] [ ,preserveCompression ] [ ,noSplit ] [ ,expireDays ]);

dfuwuid := STD.File.fCopy( sourceLogicalName, destinationGroup , destinationLogicalName, [ ,sourceDali ] [ ,timeOut ] [ ,espServerIPPort ] [ ,maxConnections ] [ ,allowOverwrite ] [ ,replicate ] [ ,asSuperfile ] [ ,compress ] [ ,forcePush ] [ ,transferBufferSize ] [ ,preserveCompression ] [ ,noSplit ] [ ,expireDays ]);

sourceLogicalNameA null-terminated string containing the logical name of the file.
destinationGroupA null-terminated string containing the destination cluster for the file.
destinationLogicalNameA null-terminated string containing the new logical name of the file.
sourceDaliOptional. A null-terminated string containing the IP and Port of the Dali containing the file to copy. If omitted, the default is an intra-Dali copy.
timeOutOptional. An integer value indicating the timeout setting. If omitted, the default is -1. If set to zero (0), execution control returns immediately to the ECL workunit without waiting for the DFU workunit to complete.
espServerIPPortOptional. This should almost always be omitted, which then defaults to the value contained in the lib_system.ws_fs_server attribute. When not omitted, it should be a null-terminated string containing the protocol, IP, port, and directory, or the DNS equivalent, of the ESP server program. This is usually the same IP and port as ECL Watch, with "/FileSpray" appended.
maxConnectionsOptional. An integer specifying the maximum number of connections. If omitted, the default is -1, which indicates the system chooses a suitable default based on the size of the cluster.
allowOverwriteOptional. A boolean TRUE or FALSE flag indicating whether to allow the new file to overwrite an existing file of the same name. If omitted, the default is FALSE.
replicateOptional. A boolean TRUE or FALSE flag indicating whether to automatically replicate the new file. If omitted, the default is FALSE.
asSuperfileOptional. A boolean TRUE or FALSE flag indicating whether to treat the file as a superfile. If omitted, the default is FALSE. If TRUE and the file to copy is a superfile, then the operation creates a superfile on the target, creating subfiles as needed while overwriting only those already existing subfiles whose content has changed. If FALSE and the file to copy is a superfile, then the operation consolidates all the superfile content into a single logical file on the target, not a superfile. If FALSE and the file to copy is a superfile containing INDEXes, then the operation is not valid and will produce an error. 
compressOptional. A boolean TRUE or FALSE flag indicating whether to LZW compress the new file. If omitted, the default is FALSE.
forcePush Optional. A boolean TRUE or FALSE flag indicating whether to execute the copy process on the source nodes and push to the targets instead of executing on the targets and pulling from the source. This option is only valid within the same environment. If omitted, the default is FALSE.
transferBufferSize Optional. An integer value to override the DFU Server's buffer size value (default is 64k)
preserveCompression Optional. A boolean TRUE or FALSE flag indicating whether to preserve the compression of the old file when copying. If omitted, the default is TRUE.
noSplitOptional. A boolean TRUE or FALSE flag indicating to not split a file part to multiple target parts. Default is FALSE.
expireDays Optional. Specifies the file is a temporary file to be automatically deleted after the specified number of days since the file was read. If omitted, the default is -1 (never expires). If set to 0, the file is automatically deleted when it reaches the threshold set in Sasha Server's expiryDefault setting.
dfuwuidThe attribute name to receive the null-terminated string containing the DFU workunit ID (DFUWUID) generated for the job.
Return: Copy returns a null-terminated string containing the DFU workunit ID (DFUWUID).

The Copy function takes a logical file and copies it to another logical file. This may be done within the same cluster or to another cluster. The Destination cannot be foreign file.

Example:

STD.File.Copy('OUT::MyFile',STD.System.Thorlib.Group(),'OUT::MyNewFile');