Language:
Русский
English
{Rename.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the Rename procedure.}
uses WinCrt;
var
f : file;
begin
{ Rename a file. Old and new names
given on command line. }
if ParamCount <> 2 then
begin
Writeln('Wrong number of parameters');
Halt(1);
end;
Assign(f,ParamStr(1));
Writeln('Renaming ',ParamStr(1),
' to ',ParamStr(2));
Rename(f,ParamStr(2));
end.