Answer the question
In order to leave comments, you need to log in
Powershell how to delete many files with delete via pipeline?
There are several thousand folders with rum games in the current directory, in each of them, apart from a good dump of rum, there is a bunch of unnecessary ones, I actually wrote such a command so that only files ending in [!].nes remain
Get-ChildItem * -Recurse | Where-Object {$_.name -notmatch ".+[^W\]](\[\!\]\.nes)$"} | ForEach-Object { Remove-Item -LiteralPath $_.Name }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question