Consider this .bat file:
@ECHO OFF
ECHO Owner: Jeremy.Coulson
ECHO Food: Ham sandwiches
ECHO Drink: Lemonade
Consider this second .bat file:
@ECHO OFF
FOR /F "tokens=*" %%a in ('source.bat') do SET OUTPUT=%%a
echo %output%
The result of running the second .bat file is:
Drink: Lemonade
Clearly, what I'm doing here is only getting the last thing output by source.bat. What if instead, I wanted to specify which line to retrieve as the variable? What if, for example, I want to retrieve only whatever is on the "Food" line?