How to delete recursively all directories inside a folder?

The for command can use /r for recursive

/d is for directory type

/f is for files

Also, you can use @for and @rd to skip printout to console.

DELETE all bin* directories

for /r /d %d in (bin*) do rd /s /q "%d"

DELETE all obj* directories

for /r /d %d in (obj*) do rd /s /q "%d"
Advertisements
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s