program RmDirDemo;
var
  Foo: String (127);
begin
  WriteLn ('Enter directory name to remove: ');
  ReadLn (Foo);
  {$i-}                     { Suppress exit on error }
  RmDir (Foo);
  if IOResult <> 0 then
    WriteLn ('Directory ', foo, ' could not be removed.')
  else
    WriteLn ('Okay.')
end.
