Result = RenameFile(OldFilename$, NewFilename$)Description
Rename the old file to the new file.
OldFilename$ The old name of the file. NewFilename$ The new name of the file.
Returns nonzero if the operation succeeded and zero if it failed.
The old and new filename do not have to be in the same directory, so this function can be used to move a file to a different directory. This function can also be used to rename/move directories.
If RenameFile("C:\test.txt", "D:\temp\test_backup.txt") Debug "Moving and renaming successful." ; Moving and renaming of the file was successful Else Debug "Moving and renaming failed." ; Moving and renaming failed, e.g. because of a not found source file EndIf
CopyFile(), DeleteFile(), CreateFile(), CopyDirectory()