<< back to sysax.com Product page

5.1. Renaming files and folders

Files and folders can be renamed using the ftprename command. The predefined keywords local and remote are used to apply this command on either the local or remote computer. Both the original name string and the new name string should be specified. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

Exhibit 5.1. Syntax of command for renaming files and folders

ftprename <keywords: local, remote>, <original name string>, <new name string>;

Exhibit 5.2. Examples for using the command for renaming files and folders

ftprename local, "file_1.txt", "file_1_0305.txt"; #rename local file

ftprename remote, "file.log", "file_0305.log"; #rename remote file