RMDIR (RD) (Remove Directory)


Type: Internal (2.0 and later)

Syntax:

RMDIR [d:]path

Purpose: Removes a subdirectory.

Discussion

RMDIR removes directories that are empty. To determine if a directory is empty, use the DIR command to display the directory`s contents. For example, to determine if the directory NEWFILES is empty, enter

dir c:\newfiles

The display of an empty directory should look like this:

Volume in drive C is DOS1
Directory of C:\NEWFILES

. DIR 4-09-87 8:36p
.. DIR 4-09-87 8:36p

2 File(s) 17671520 bytes free

For more information on using the RMDIR command and other fixed-disk commands, refer to Chapter 3, Using Fixed Disks.

Example

To remove the directory NEWFILES from drive C, enter

rd c:\newfiles
To remove the directory SALES that is within the NEWFILES directory on drive C, enter

rd c:\newfiles\sales


Back to the Easy DOS Command Index