technology

Cleanup/delete all .svn folders

I recently needed to recursively delete all of the .svn folders in a directory because I was copying them into an existing working copy (and who knows what would happen if you mixed in .svn folders from a different branch?). The google helped me find this cmd.exe one-liner, and I’m simply reposting it here for reference:

FOR /F "tokens=*" %G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%G"

This is assuming you’re sitting at the root folder where you want to recurse from.

Advertisements
Standard

One thought on “Cleanup/delete all .svn folders

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