@echo off
set nowPath=%cd%
cd /
cd %nowPath%
::delete specify file(*.pdb,*.vshost.*)
for /r %nowPath% %%i in (*.pdb,*.vshost.*) do (del %%i)
::delete specify folder(obj,bin,.vs)
for /r %nowPath% %%i in (obj,bin,.vs) do (IF EXIST %%i RD /s /q %%i)
echo OK
pause
将上述命令保存到clear.bat文件中,将该文件丢到解决方案根目录,点击执行即可快速清除所有bin,obj目录
评论区