|I want to open a file called text1.txt find the line that contains <id>example</id> and save example to the variable %ID%.|
I know that I want to FIND </id> then use a FOR /f loop with tokens=2 delims=< to limit the temp variable down to "<id>example" then remove <id> somehow and save example to %ID%, but how?
Just to clarify example will be unknown it could be anything.
This is what I have atm:
for /f "tokens=2 delims=<" %%a in ('find "</id>" campaigns.xml') do set var=%%a
which outputs id>example
How do I make it work with more then 1 example?
Thanks in advance!