|
RMDIR or RD
Removes (that is, deletes) a directory.
Syntax
RMDIR pathname
RMDIR /S pathname
RMDIR /S /Q pathname
RD pathname
RD /S pathname
RD /S /Q pathname
Key
pathname : Specifies the location and name of the
directory that you want to delete.
/S : Deletes all files and subfolders
in addition to the folder itself.
Use this to remove an entire folder tree.
/Q : Runs RMDIR in quiet mode. Deletes directories
without confirmation.
Place any long pathnames in double quotes.
You cannot delete a directory that contains files, including
hidden or system files.
RMDIR does not support wildcards but you can remove several
folders in one command by listing the pathname to each.
Use the DIR command to list hidden and system files, and the
ATTRIB command to remove hidden and system attributes from
files.
You cannot use RMDIR to delete the current directory.
Examples
To delete the directory \Reports and all of the
subdirectories and files:
RMDIR /s \reports
You can remove several folders in one command:
RD c:\reports\Jan c:\reports\Feb "c:\My Documents\may"
Cmd Commands
|