Powershell - How to use "remove-item" with multiple selectors and wildcards?
Solution 1:
For a single directory:
remove-item C:\path\to\test-folder\* -include *.mp3, *.mpeg
or a useful method for when files span multiple directories:
remove-item C:\path\to\test-folder\*.mp3, C:\path\to\other\test-folder\*.mpeg
or you could move to that directory first:
cd C:\path\to\test-folder\
remove-item *.mp3, *.mpeg
Use Get-Help Remove-Item -full
for full details of available flags and usage.