5.3.8 RENAME

The RENAME command renames the specified local file to a new name. The TO file must be in the same directory as the original, FROM file.

Syntax:

Command

Keyword

Value

Developer notes

RENAME

FROM

value

Required. Old file name.

TO

value

Required. New file name.

REPLACE

*YES

Optional. Replace file.

*NO

Do not replace file.
The default value of the REPLACE keyword is *NO.
If the TO filename exists, then the rename process is stopped, unless the REPLACE keyword is *YES.

 

Example

RENAME FROM(/folder/file.txt) TO(/folder/file2.txt)