Windows batch file to delete .svn files and folders

前端 未结 8 1401
一生所求
一生所求 2021-01-30 09:16

In order to delete all \".svn\" files/folders/subfolders in \"myfolder\" I use this simple line in a batch file:

FOR /R myfolder %%X IN (.svn) DO (RD /S /Q \"%%X         


        
8条回答
  •  猫巷女王i
    2021-01-30 10:03

    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. Your 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.

提交回复
热议问题