Hi Experts,
I am extracting a string from file1.txt which might have a path in content with double quotes
Content from file1
E. 2015-08-17 23:00:01 Error in the following line "C:\Program Files\Adobe\" . Please check for administrator privileges.
I extract this line from file1.txt and searching for the same line in file2.txt. I have no control over content in the file1 or file2.
This is what I am trying to do. but getting errors because of slashes and quotes.
[string]$lastline=Get-Content file1.txt|Select-String -Pattern ^"E." |select -last 1
Get-Content file2.txt |Select-String $lastline