Integration Server 10.5 | Built-In Services Reference Guide | File Folder | Summary of Elements in this Folder | pub.file:copyFile
 
pub.file:copyFile
WmPublic. Copies a file from one directory to another.
If a file with the same name as the file being copied exists in the targetDirectory, the pub.file:copyFile service throws an error on execution.
Input Parameters
fileName
String The absolute path name of the file to be copied.
targetDirectory
String Directory to which the file specified in the fileName parameter will be copied.
appendTimestamp
String Optional. Specifies whether the current timestamp will be appended to the target filename. Set to:
*true to append a timestamp to the target fileName in the yyyyMMddHHmmss format.
*false to omit a timestamp from the target fileName.
Output Parameters
targetFileName
String The absolute path name of the target file to which the fileName parameter is copied.
Usage Notes
For security reasons, the pub.file:copyFile service checks the input fileName against the list of allowedReadPaths and the input targetDirectory against the list of allowedWritePaths specified in the fileAccessControl.cnf file. If the file name or directory is not specified in the respective allowed lists, Integration Server throws an exception. For information about configuring the fileAccessControl.cnf file, refer to File Access Control Configuration for the pub.file Services.