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
I use a slight modification of Robert H which skips errors and prints the delete files. I usally also clear the .vs
, _resharper
and package
folders:
Get-ChildItem -include bin,obj,packages,'_ReSharper.Caches','.vs' -Force -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse -ErrorAction SilentlyContinue -Verbose}
Also worth to note is the git
command which clears all changes inclusive ignored files and directories:
git clean -dfx