Node: RmDir, Next: Round, Previous: Rewrite, Up: Reference

### RmDir

#### Synopsis

         procedure RmDir (Directory: String);

#### Description

`RmDir` removes the given Directory if its argument is a valid parameter to the related operating system's function. Otherwise a runtime error is caused.

#### Conforming to

`RmDir` is a Borland Pascal extension.

#### Example

         program RmDirDemo;
         var
           Foo: String (127);
         begin
           WriteLn ('Enter directory name to remove: ');
           ReadLn (Foo);
           {$I-}  { Don't abort on I/O errors }
           RmDir (Foo);
           if IOResult <> 0 then
             WriteLn ('Directory ', Foo, ' could not be removed.')
           else
             WriteLn ('Okay.')
         end.

#### See also

ChDir, MkDir