RENAMEFILE

The RENAMEFILE function renames the source file to that of the destination file. If the operation succeeds, the returned value is 0; if it fails, then an operating system-specific error number is returned.

Syntax:
resourcelib->RENAMEFILE (single-text-expression, single-text-expression, single-text-expression, single-text-expression)
Meaning:
RENAMEFILE (source, destination, number_of_retries (max 100), pause_between_retries_in_ms (max 100000))
Returns:
A single number

When used as a part of this rule:

=resourcelib->RENAMEFILE("C:\MyDir\File1.txt", "C:\MyDir\File2.txt")

In this scenario, the return value is "0".

Renames the file within the same directory. The renaming overwrites any existing file File2.txt.