Howtos / Articles

PowerShell Command to Recursively Delete Thumbs.db

The PowerShell command below can be used to remove thumbs.db files from the current folder, and all sub folders.

Make sure you change directory ‘cd’ into the folder you want the command to run from.

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

You can change the ‘-Include’ parameter to any wildcard you like, such as *.tmp or *.bak for example.

Get-ChildItem -Path . -Include *.tmp -Recurse -Name -Force | Remove-Item -Force

Remove the ‘Remove-Item’ statement to simply view a list of files without actually deleting them.

Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force


Share this howto article!
  • Facebook
  • Twitter
  • Reddit
  • email

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>