Use Powershell to remove all instances of thumbs.db in current tree


/ Published in: Windows PowerShell
Save to your folder(s)

Powershell 1.0's Remove-Item recursion "doesn't work" according to the help, so you must find all instances with Get_ChildItem then pass the results to Remove-Item. Use th ecommented -"WhatIf" argument to determine what will be deleted before executing for real.


Copy this code and paste it in your HTML
  1. Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force | Remove-Item -Force #-WhatIf

Report this snippet


Comments


You need to login to view comments.