Recently I have to clean up my .Net solution with a long list of projects. One of cleanup is to remove all
obj
folders. It is very tedious doing it manually.
I turn to Powershell Script to find a quick way. Soon I got my solution, only two lines of codes and I could do in PS console interactively:
Here is the function:
$a = Get-ChildItem -Path H:MyRepository\Solution\ -Recurse | Where-Object {$_Name -Match '^obj$' }
$a | { rm -r $_.FullName }
Repeat the same steps to remove
bin
folders.