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:
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