I need a batch file that will recursively remove all directories with a certain filename. This is what I have so far and its not working.
FOR /D /r %%G IN ("*.svn") DO DEL %%G
Thanks!
I need a batch file that will recursively remove all directories with a certain filename. This is what I have so far and its not working.
FOR /D /r %%G IN ("*.svn") DO DEL %%G
Thanks!
Wow I recently just did something exactly like this:
edit
FOR /F %%C IN ('dir *.svn /s /b') DO DEL %%~C\*.*
FOR /D %%C IN ('dir *.svn /s /b') DO RMDIR %%~C
You probalby need to pass some parameters to del
to allow it to delete without asking yes/no
Alternatively just do svn export
to checkout code from the repository without those pesky .svn directories.
If you are able to work with Powershell you can use this snippet:
get-childitem . -include .svn -force -recurse | foreach ($_) {remove-item -force $_.fullname}
It's taken from here. Actually if you can use Powershell just forget DOS :)
By the way the dir
command has a /s
to act recursively (like -r/-R
for unix like shells)