FileRename(OldFileName,NewFileName)

Renames a file.

Parameters:

OldFileName The filename of the existing file
NewFileName The new filename for the file

Remarks:

If OldFileName does not exists, NewFileName already exists or any other error occurs, an error is raised.

Example:

Call FileRename("C:\TEST.TXT", "C:\TEST.BAK")