Originally Posted by
returns the following output
input_file:key1 ; value1[/B]
I need to be able to assign the value of "value1" into a variable "VAR1" that i can use in the script later. Any ideas as to how to do this. Or is there a better/easier way to get the same result.
One way to get to the value1 is as follows
for /F "tokens=2,3,* delims=;" %i IN ('findstr /L "key1" input_file') do @echo %i
this is a special format of the "for
" command, which is splitting the output of the "findstr
" command working on the *.ctr
file name and returning only one of the tokens presented to the FOR
My next step is to be able to assign the result of the "for
" command to a variable that I can use later in the script. Any ideas. Thanks.