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.
Wednesday, August 20, 2014
PS: Remove folder recursively
Posted by D Chu at 2:24 PM
Labels: PowerShell, Visual Studio Tips
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment