RenameFile Routine Changes a file name.
Unit SysUtils
Syntax [C++] bool
RenameFile (AnsiString OldName, AnsiString NewName);
Description RenameFile attempts to change the name of the file specified by OldFile to NewFile. If the operation succeeds,
RenameFile returns true. If
RenameFile cannot rename the file (for example, if the application does not have permission to modify the file), it returns false. Note:
If NewFile represents the name of an existing file,
RenameFile behaves differently under Windows and Linux. Under Windows, the rename operation fails. Under Linux,
RenameFile silently removes the other file.
Partager