Nav

To Copy and Move Files with the FTP Connector

The connector also provides the ability to copy and move files or directories on demand.


       
    
1
2
3
4
5
6
<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"/>

Notice the targetPath and renameTo parameters:

  • targetPath is the path to the directory into which the file is to be copied or moved. This path must point to a directory.

  • renameTo is 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.