Deleting All BIN & OBJ Folders in a Visual Studio Solution
Published in
2 min readMar 19, 2018
Sometimes it turns out that we have to delete all bin and obj folders recursively in a Visual Studio solution. There’s a built-in Visual Studio feature called Clean Solution but it doesn’t delete them all.
This is my way to for deleting all BIN and OBJ folders recursively.
- Create an empty file and name it DeleteBinObjFolders.bat
- Copy-paste code the below code into the DeleteBinObjFolders.bat
- Move the DeleteBinObjFolders.bat file into 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
I hope you will benefit. Happy coding!
This article was originally published on Volosoft Blog.
I’m Alper Ebicoglu 🧑🏽💻 ABP Framework Core Team Member
Follow me for the latest news about .NET and software development:
📌 twitter.com/alperebicoglu
📌 github.com/ebicoglu
📌 linkedin.com/in/ebicoglu
📌 medium.com/@alperonline