Shine Tutorial    
  shinetutorialtopsideimage
HOME DOS OS C,C++ HTML CSS XML JAVA ASP PHP SQL OFFICE MULTIMEDIA MORE... CERTIFICATION ABOUT
 
S T ADVT
TUTORIALS
 

MS - DOS Command

« Previous Next Chapter »

Microsoft DOS rd and rmdir command

Quick links

About rd and rmdir
Availability
Syntax
Examples

About rd and rmdir

Removes empty directories in MS-DOS. To delete directories with files or directories within them the user must use the deltree command, or if you are running Microsoft Windows 2000 or Windows XP use the /S option.

Availability

The rd and rmdir commands are internal commands and are available in the below Microsoft operating systems.

All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7

Syntax

Removes (deletes) a directory.

RMDIR [drive:]path
RD [drive:]path

Windows 2000 and Windows XP Syntax.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree.
/Q Quiet mode, do not ask if ok to remove a directory tree with /S.

Examples

rmdir c:\test

Remove the test directory, if empty. If you want to delete directories that are full, use the deltree command or if you're using Windows 2000 or later use the below example.

rmdir c:\test /s

Windows 2000, Windows XP and later versions of Windows can use this option with a prompt to permanently delete the test directory and all subdirectories and files. Adding the /q switch would suppress the prompt.


« Previous Next Chapter »