Posted On 2007-04-24 by FortyPoundHead
Keywords: Command Reference
Tags: Windows Commandline Windows
Views: 1528

Delete folder(s)

RD pathname
RD /S pathname
RD /S /Q pathname

/S : Delete all files and subfolders
in addition to the folder itself.
Use this to remove an entire folder tree.

/Q : Quiet - do not display YN confirmationPlace any long pathnames in double quotes.

RD does not support wildcards but you can remove several folders in one command by listing the pathname to each.

RD c:\docs\Jan c:\docs\Feb "c:\My Documents\Mar"

RMDIR is a synonym for RD

About the Author

has posted a total of 1974 articles.

Comments On This Post

No comments on this post yet!

Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.

Your IP address is:

Before you can post, you need to prove you are human. If you log in, this test goes away.

Code Links