Offers
Thanks for visiting www.technoexam.com. Stay connected with us for more latest programming updates...

You are here : Home >> Tutorials >> Dos

Go
DOS Tutorial

Contents
Introduction to DOS
MS-DOS History
Execute Commands
Assoc
At
Attrib
Cd / Chdir
Chkdsk
Cls
Color
Copy
Date
Del / Erase
Echo
Exit
Format
Help
Md / Mkdir
Move
Pause
Rd / Rmdir
Rem
Ren / Rename
Time
Title
Tree
Type
Ver
Vol

Contact Us

+91-8806583119

RMDIR / RD - DOS Command

It removes or delete a directory or folder.

To view 'rmdir or rd' command with its all possible parameters you can use following command. Its like help information to regarding that command.

rmdir/?

OR

rd/?

Syntax :

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

where,
/S : It removes all directories/folders and files in the
specified directory in addition to the directory itself
also. It is special kind of command used to remove or
delete a directory tree.

/Q : It is a Quiet mode, which do not ask if ok to
remove a directory tree with /S.
Use 1:

rmdir /s c:\test1

Use 2:

rd /s c:\test2

Use 3:

rmdir /q c:\test3

Use 4:

rd /q c:\test3

Output :

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
D:\DINESH > rmdir /s c:\test1 c:\test1, Are you sure (Y/N)? y
D:\DINESH > rd /s c:\test2 c:\test2, Are you sure (Y/N)? y
D:\DINESH > rmdir /q c:\test3 The directory is not empty.
D:\DINESH > rd /q c:\test3 The directory is not empty.
D:\DINESH > _

Download PDF
Published on: 12th Nov 2010, Last Updated on: 18th Dec 2014

Mr. Dinesh Kudache
AUTHOR: Mr. Dinesh Kudache

Mr. Dinesh is the Founder and CEO of technoexam.com. He had 6+ years experience in Application Programming, System Programming, Web Design and Development, Google Expertise. He had written 5000+ various articles on programming. Browse more articles by this author.

Link this post on your Blog/Website :