Rename the file informed in the src attribute, to the name specified in the dst attribute.
 

1 ftp.rename

<ftp.rename
    src='src'
    dst='dst'
/>

Exceptions

attribute 'src' required

The name of the file to be renamed has not been specified.

attribute 'dst' required

The new file name has not been indicated.

java.io.FileNotFoundException

There is not file whose name matches the one specified in the src attribute.

Example

Change the name of the file.

Copy
<xsql-script name='ftp_rename_sample1'>
    <body>
        <ftp host='192.168.10.1' user='ftpuser' password='ftpdeister'>
            <println><ftp.nlst /></println>
            <println><ftp.rename src='camaras' dst='videos' /></println>
            <println><ftp.nlst /></println>
        </ftp>
    </body>
</xsql-script>

The file named 'cameras' is renamed to 'videos'.