Skip to content

Rename

Renames or moves a file on a remote environment.

1
myDocumentFiles.Rename(options: FileTransferOptions, destination: string):void

Parameters

FileTransferOptions options
    An instance of FileTransferOptions specifying the remote file.

string destination
    The new path of the file.

Examples

Move a processed file to an archive folder

1
2
3
4
5
6
$Files.Rename({
    RemoteHost : 'ftp.example.com',
    RemotePath : 'outgoing/orders.csv',
    UserName : 'transfer',
    Password : 'secret'
}, 'archive/orders.csv');

See Also