Archive for Powershell

Delete Thumbs.db files using Powershell

Posted in Coding, Windows with tags on 2010.03.02 by kasewick

Powershell is awesome. It’s both powerful and easy to read. Here is an example that will delete all thumbnail caches from the current directory and its subdirectories:

Get-ChildItem -Include Thumbs.db -Recurse -Force | Remove-Item -Force

For the paranoid, add the -WhatIf switch at the end of the line to simulate:

Get-ChildItem -Include Thumbs.db -Recurse -Force | Remove-Item -Force -WhatIf