Rename procedure
Rename file on disk.
Declaration
procedure Rename(var f: File; const s: ShortString)Description
Rename changes the name of the assigned file
F to
S.
F
must be assigned, but not opened.Errors
Depending on the state of the
{$I} switch, a runtime error can be
generated if there is an error. In the
{$I-} state, use
IOResult
to check for errors.
See also
Example: ex77
Program Example77;
{ Program to demonstrate the Rename function. }
Var F : Text;
begin
Assign (F,paramstr(1));
Rename (F,paramstr(2));
end.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
