I want to delete all bin and obj folders to force all projects to rebuild everything

后端 未结 26 2133
迷失自我
迷失自我 2020-11-28 16:53

I work with multiple projects, and I want to recursively delete all folders with the name \'bin\' or \'obj\' that way I am sure that all projects will rebuild everything (so

26条回答
  •  一个人的身影
    2020-11-28 17:40

    This is my batch file that I use for deleting all BIN and OBJ folders recursively.

    1. Create an empty file and name it DeleteBinObjFolders.bat
    2. Copy-paste code the below code into the DeleteBinObjFolders.bat
    3. Move the DeleteBinObjFolders.bat file in the same folder with your solution (*.sln) file.
    @echo off
    @echo Deleting all BIN and OBJ folders...
    for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"
    @echo BIN and OBJ folders successfully deleted :) Close the window.
    pause > nul
    

提交回复
热议问题