<ftp:copy sourcePath="source.txt" targetPath="backup" overwrite="true|false" createParentDirectories="true|false" renameTo="renamed.txt"/> <ftp:move sourcePath="source.txt" targetPath="backup" overwrite="true|false" createParentDirectories="true|false" renameTo="renamed.txt"/>
Copy and Move Files with the FTP Connector
The connector also provides the ability to copy and move files or directories on demand.
targetPathis the path to the directory into which the file is to be copied or moved. This path must point to a directory.
renameTois an optional parameter that renames the file as part of the operation. This parameter must be a file name, not a path. If this attribute is not provided, the original file name is retained.
While SFTP has a native concept of copying and moving, FTP does not. The connector simulates these operations by downloading file content and writing it to a new location. Although all of this is done with concurrent streams that start writing at the same time as it starts reading, copying and moving does have a significant network overhead and should be used wisely.
This operation simply creates a directory of a given name. If the reason for creating the directory is to write, copy or move contents to it immediately after, then use the write, copy, or move operations with the
For a complete description of the parameters, return type and errors, see the FTP Create Directory operation.