Have an INI file with contents like:
I want to pick one entry e.g. Bob and put it in an environment variable. This works:Code:Alice=One2Three Bob=Four5Six
Code:for /f "usebackq tokens=2 delims==" %%i in (`findstr Bob file.ini`) do set Bob=%%i
Took me a teensy while to arrive there having first failed with other approaches. Has anyone ever got "other approaches" to work or is this pretty much what you have to do?



LinkBack URL
About LinkBacks
Reply With Quote




