I'm currently running a PowerShell (v3.0) script, one step of which is to retrieve all the HTML files in a directory. That works great:
$srcfiles = Get-ChildItem $srcPath -filter "*.htm*"
However, now I'm faced with having to identify all the non-HTML files...CSS, Word and Excel docs, pictures, etc.
I want something that would work like the -ne
parameter in conjunction with the -filter
parameter. In essence, give me everything that's not "*.htm*"
-filter -ne
doesn't work, I tried -!filter
on a whim, and I can't seem to find anything in powershell doc on MSDN to negate the -filter
parameter. Perhaps I need to pipe something...?
Does anyone have a solution for this?