The Rename
procedure changes the name of the desired file.
Declaration
Rename(FileVar, NewName)
Parameters
FileVar | [in] | Required | Variant | |
NewName | [in] | Required | String | |
Result | None |
Description
Changes the name of file associated with the file variable by calling the AssignFile
procedure. The specified file must be closed before it is renamed.
Parameters
The procedure has the following parameters:
FileVar
Specifies the file variable, which is associated with the desired file by calling the AssignFile
procedure.
NewName
Specifies the variable that holds the new file name.
Remarks
After executing the Rename
procedure, all of the operations work with the file that has the new name.
See Also
DelphiScript - List of Supported Routines and Variables
AssignFile
Erase