I want to get list of files (actually number of files) in a path, recursively, excluding certain types:
Get-ChildItem -Path $path -Recurse | ? { $_.Name -notlike "*.cs" -and $_.Name -notlike "*.tt" }
but I have a long list of exclusions (to name a few):
@("*.cs", "*.tt", "*.xaml", "*.csproj", "*.sln", "*.xml", "*.cmd", "*.txt")
How to get the list using this form:
Get-ChildItem -Path $path -Recurse | ? { <# what to put here ?#> }
?