Super Geeky: Removing Subversion files from a directory with Windows Powershell
There have been times when I’ve wanted to remove the .svn subversion repository folder from an entire directory. With Windows Powershell, you can do that in a one line command:
get-childitem C:\your-directory -include .svn -recurse -force | foreach ($_) { remove-item $_.fullname -recurse -force}
The one thing I discovered is that you need to include “-force” in order for windows to “see” the hidden folders and files.
I highly recommend you add the –whatif parameter to the end of the remove-item command before you run this just to be sure its only hitting the files you want.
This article was helpful in getting me on track.
















No Comments, Comment or Ping
Reply to “Super Geeky: Removing Subversion files from a directory with Windows Powershell”