Guest User

Untitled

a guest
Feb 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. $debugRegex = 'Debug'
  2. $releaseRegex = 'Release'
  3. $path = 'g:\Projects\'
  4. $f = "*.*proj"
  5.  
  6. foreach ( $file in gci -Path $path -Filter $f -Recurse) {
  7. $file.FullName
  8. foreach($line in [System.IO.File]::ReadLines($file.FullName) | Where-Object {$_ -match $debugRegex})
  9. {
  10. if( $line -match $releaseRegex) {
  11. $line
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment