Declaration: RenameFile (OldName, NewName: string): boolean;
RenameFile attempts to change the name of the file specified by OldName to NewName. A TRUE value is returned if the operation succeeds. OldName has to be fully specified (including the path of the file). If NewName does not contain a path the file specified by OldName is just renamed to NewName, if NewName contains a valid path the file is renamed and moved to the path specified in NewName.

Hint: RenameFile noes not overwrite an existing file, in this case a FALSE value is returned.