RenameFile

Summary

The RenameFile command renames the specified file. The command has accesses files and directories located on Connect’s SFTP server file system.

Syntax

 RenameFile(FilePath=<path_to_file>, Name=<new_file_path_and_name>)

Parameters

Parameter Description
FilePath (Required) A string value or expression that lists the fully qualified path and file name for the source file. Unix-style paths are used.
Name (Required) A string value or expression that lists the fully qualified path and file name for the target file. Unix-style paths are used. The directory path must exist prior to running the command.

Details

Connect is integrated with Xactly’s SFTP server, connectftp.xactlycorp.com. Connect’s file commands can read and write files and manipulate directory structures located on the SFTP file system. An SFTP account is not required to use these functions. However, one is required to access the file system via SFTP clients. Contact Xactly Customer Support to setup an SFTP account if your business does not already have one.

The function can rename one file at a time. The result set status_code and status_message indicate whether the rename was successful.

Examples

call RenameFile(FilePath='/source_files/2016-04-01_HRMS.csv', 
Name='/archive/2016-04-01_HRMS.csv'||CurDate());

renamefile_01

Related Commands

CopyFile

DirList

MoveFile