Command to recursively remove all .svn directories on Windows

后端 未结 8 1123
死守一世寂寞
死守一世寂寞 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:19

    As an important point, if you want to run shell to delete .svn folders, you may need -depth argument to prevent find command entering the directory that was just deleted and showing silly error messages like e.g.

    "find: ./.svn: No such file or directory"
    

    To get rid of this error, you can use the find command as the following:

    cd [dir_to_delete_svn_folders]
    find . -depth -name .svn -exec rm -fr {} \;
    

提交回复
热议问题