Deleting All BIN & OBJ Folders in a Visual Studio Solution

Alper Ebiçoğlu
Mar 19, 2018 · 1 min read

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.

Image for post
Image for post

This is my way to for deleting all BIN and OBJ folders recursively.

  1. Create an empty file and name it DeleteBinObjFolders.bat
@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
Image for post
Image for post
Deletes all BIN & OBJ folders with a double-click.

I hope you will benefit. Happy coding!

This article was originally published on Volosoft Blog.



Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store