System.Rename
Delphi
procedure Rename(var F: File; Newname: String);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure | public | System.pas | System | System |
Description
Changes the name of an external file.
The external file associated with F is renamed Newname. Further operations on F operate on the external file with the new name.
F is a variable of any file type. Newname is a string-type expression or an expression of type PChar if the extended syntax is enabled.
Note: {$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.
See Also