Removing Unwanted Files with PowerShell
Sometimes after using gVim on Windows, I end up with temporary files.
I'd really like to remove all the files in
.\content that end in
find on Unix immediately comes to mind, PowerShell's
feel right at home.
1Get-ChildItem -Path .\content -Filter *~ -File | Remove-Item
Our directory is free from unwanted files!
Note It's also possible to directly use the
Remove-Item command, but by
Get-ChildItem we can safely fine-tune our query before piping it to the