Command to recursively remove all .svn directories on Windows

后端 未结 8 1106
死守一世寂寞
死守一世寂寞 2020-12-07 08:12

I have a directory with many sub-directories. In each folder there is a subversion folder (.svn).

Is there a command in windows that will go through each folder and

相关标签:
8条回答
  • 2020-12-07 08:38

    If you want to delete all sub folders named .svn in windows then create batch file with this content:

    for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *.svn') do (
    rd /s /q "%%i"
    )
    

    save it in a file del_All_Dot_SVN_Folders.cmd . Run it. You're done.

    Thanks to http://www.axelscript.com/2008/03/11/delete-all-svn-files-in-windows/

    Remember the above code has .svn whereas the code in the link has only *svn so its better to have the .svn to not accidentally have undesired effect.

    0 讨论(0)
  • 2020-12-07 08:39

    Sorry for being late to the party but here's another one in a single line:

    for /r %i in (.svn) do rmdir /s /q "%i"
    
    0 讨论(0)
提交回复
热议问题