summaryrefslogtreecommitdiff
path: root/fpcdocs/sysutex/ex44.pp
blob: 3a3287ac1107b6cca8b8b1e9a856fc9a85f7e6a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program Example44;

{ This program demonstrates the RenameFile function }

Uses sysutils;

Var F : Longint;
    S : String;

Begin
  S:='Some short file.';
  F:=FileCreate ('test.dap');
  FileWrite(F,S[1],Length(S));
  FileClose(F);
  If RenameFile ('test.dap','test.dat') then
    Writeln ('Successfully renamed files.');
End.