Created
August 4, 2017 10:23
-
-
Save johnmmoss/512089edad94ed653543d68774eeaf9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$lines = select-string -Path E:\Code\Application\Websit1.sln -Pattern "^Project.*" | |
$lines | % { | |
$pattern = "Project.*=\s`"([^`"]*)`", `"([^`"]*)" | |
if ([Regex]::IsMatch($_.Line, $pattern) ) { | |
$matches = [Regex]::Matches($_.Line, $pattern) | |
$name = $matches[0].Groups[1].Value | |
$path = $matches[0].Groups[2].Value | |
$object = New-Object –TypeName PSObject | |
$object | Add-Member -MemberType NoteProperty –Name Name –Value $name | |
$object | Add-Member –MemberType NoteProperty –Name Path –Value $path | |
$object | Add-Member –MemberType NoteProperty –Name FullPath –Value “E:\Code\$path” | |
$object | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment