next up previous contents index
Next: Round Up: Functions and Procedures Previous: Rewrite

Rmdir

   

Declaration:

Procedure Rmdir (const S : string) ;

Description:

Rmdir removes the directory S.

Errors:

If S doesn't exist, or isn't empty, a run-time error is generated.

See also:

Chdir, Rmdir

Example
Program Example53;

{ Program to demonstrate the MkDir and RmDir functions. }

Const D : String[8] = 'TEST.DIR';

Var S : String;

begin
  Writeln ('Making directory ',D);
  Mkdir (D);
  Writeln ('Changing directory to ',D);
  ChDir (D);
  GetDir (0,S);
  Writeln ('Current Directory is : ',S);
  WRiteln ('Going back');
  ChDir ('..');
  Writeln ('Removing directory ',D);
  RmDir (D);
end.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998