for /f "tokens=1,* delims== " %%i in ('find "=" ipsetting.txt') do set %%i=%%j
First trick: include only needed files (the lines, that have a =
) (find "="
)
second trick: eliminate spaces (with delims): use =
and Space () as delimiters (multiple delimiters are treated as one, so in
ST = 9992
token 1 is ST
without trailing space and token 2 is 9992
without leading space)