Created
November 2, 2011 22:27
-
-
Save stack72/1335132 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$test_assemblies = (Get-ChildItem "$src_folder" -Recurse -Include *Test.dll, *Tests.dll) | |
this will select everything as expected but I want to exclude some folder types | |
*\obj | |
*\package | |
*\debug | |
Please Help! |
Try this:
$test_assemblies = (Get-ChildItem "$src_folder" -Recurse -Include *Test.dll,*Tests.dll |? { $_.FullName.Contains("\bin\") })
This will filter out anything that doesn't contain the string "\bin" in its path...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get-Item -Path C:\MyPath -Exclude obj, package, debug -Include *Test.dll, *Tests.dll | Get-ChildItem -Recurse | Where-Object { -not $_.PSIsContainer }