/ Published in: Windows PowerShell
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.
Expand |
Embed | Plain Text
Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force | Remove-Item -Force #-WhatIf
Comments
Subscribe to comments
You need to login to post a comment.

Nice, works just like it should.
I made a similar post for batch, but this does the job more completely, as batch can't go into sub-sub-sub maps and powershell can.