# Friday, July 06, 2007
« Recursively Remove Same Named Directory | Main | Out Parameters With Rhino Mocks »
So I spent a few hours on the 4th of July learning to use Windows PowerShell.  I was intrigued by the raw power available WMI, COM, and best of all .NET all from a scripting platform made for doing admin like tasks.  The best part is that the interfaces between local disk, UNC paths, and even registry keys are all the same.  So with my new tool in hand, I thought I would give my problem of recursive deletion of "_thumbs" directories another shot.

Get-ChildItem -path c:\temp -filter _thumbs -recurse | Remove-Item

How much simpler is that?!  That's what I wanted to do the first time with the regular windows command shell.  I'm sold, I'm using the Windows CommandShell from here on out - and you should too.

Comments are closed.