For /F to process multiple lines
Posted: 27 May 2021 08:52
Hi, im pretty new to batch , and im not sure if this topic was spoken about Already on this forum. Im not very good at searching. So hear is my question:
is it possible for, for /f to process a command that outputs more then one line?
Here is my example:
For /F "delims=:" %%G in ('systeminfo') do (
set "%%G=%%H"
rem HERE IS WHERE I GET STUCK
)
%%G is going to equal OS NAME and %%H is going to equal AR Coding.
I want for to process all the lines. I want to be able to set all the lines after that also as variables. Is that possible?
is it possible for, for /f to process a command that outputs more then one line?
Here is my example:
For /F "delims=:" %%G in ('systeminfo') do (
set "%%G=%%H"
rem HERE IS WHERE I GET STUCK
)
%%G is going to equal OS NAME and %%H is going to equal AR Coding.
I want for to process all the lines. I want to be able to set all the lines after that also as variables. Is that possible?