Integration Server 10.5 | Built-In Services Reference Guide | File Folder | Summary of Elements in this Folder | pub.file:moveFile
 
pub.file:moveFile
WmPublic. Moves a file from one directory to another.
Input Parameters
fileName
String The absolute path name of the file to be moved.
targetDirectory
String Name of the directory to which the file specified in the fileName parameter is to be moved.
appendTimeStamp
String Optional. Specifies whether the current timestamp is to be appended to the file name after the file is moved to the target directory. Set to:
*false if you do not want to append a timestamp. This is the default.
*true if you want to append a timestamp in the following format: yyyyMMddHHmmss.
Output Parameters
status
String Status of the move. A value of:
*true indicates that the move was successful.
*false indicates that the move failed.
targetFileName
String Fully qualified path of the target file.
Usage Notes
For security reasons, the pub.file:moveFile service checks the input fileName parameter against the list of allowedReadPaths and the input targetDirectory against the list of allowedWritePaths specified in the fileAccessControl.cnf file. If the provided 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, see File Access Control Configuration for the pub.file Services.
If the service cannot move the file by using the default move operation in Java, the service copies the file from the source directory to the destination directory, and then removes the file from the source directory.
If a file with the same name as the fileName parameter exists in the target directory, the pub.file:moveFile service throws an error.