RMDIR (RD) (Remove Directory)

The description below is from the book
DOS the Easy Way by Everett Murdock Ph.D.

CLICK HERE for information about downloading the book.

Type: Internal (2.0 and later)


RMDIR [d:]path

Purpose: Removes a subdirectory.


RMDIR removes directories that are empty (XP version deletes directories that contain files and subdirectories). 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 RMDIR and other hard disk commands, see Chapter 3, Using Fixed Disks, in the downloadable book DOS the Easy Way .


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