I currently have an exported text file (output.txt
) from a Clear-Case command that I need to parse. It looks like this:
Comparing the following:
R1.PROD.V1@\VOB_pvob
R2.PROD.V1@\VOB_pvob
Differences:
>> M:\ACME_PROD\src\ACME@@
>> M:\ACME_PROD\src\ACME\file 2.txt@@
>> M:\ACME_PROD\src\ACME\file 1.txt@@
>> M:\ACME_PROD\src\ACME\file 3.txt@@
What I would like to do is use the findstr command to filter the strings that are contained between the ">>
" and "@@
" strings to get an output file that looks like this (with quotes if possible:
"M:\ACME_PROD\src\ACME"
"M:\ACME_PROD\src\ACME\file 2.txt"
"M:\ACME_PROD\src\ACME\file 1.txt"
"M:\ACME_PROD\src\ACME\file 3.txt"
I am new to writing batch files and so I don't exactly know where to start. I have managed to find code that can loop through the lines of a text file and separate code for the findstr command, but I get stuck trying to put it all together!
Best regards,
Andrew
Here you go
The filtered strings will be outputted into
new.txt
.