Rename a directory or file
Source position: amigados.pas line 2437
function DosRename( |
const OldName: PChar; |
const NewName: PChar |
):LongBool; |
OldName |
|
File to rename. |
NewName |
|
New name for the file. |
Rename() attempts to rename the file or directory specified as oldName with the name newName. If the file or directory newName exists, Rename() fails and returns an error. Both oldName and the newName can contain a directory specification. In this case, the file will be moved from one directory to another.
Note: it is impossible to Rename() a file from one volume to another.