how to read ini files in win batch?

December 23, 2010 at 02:32:56
Specs: Windows 7
How to read ini files in windows batch?


i find some answer that not satisfy me. So i found better: (we read ini field to batch variable witch only one line of code!)

For example i chave config.ini file:
[Remote Machines]

The answer is:
@call:ini RemoteMachineBuild var
@echo walue of RemoteMachineBuild is: %var%


@REM Function below read config.ini file form current direcotry.
@REM It have 2 parameters:
@REM %~1 - name of readed ini field,
@REM %~2 - name var to save readed value.

@for /f "tokens=2 delims==" %%a in ('find "%~1=" config.ini') do @set %~2=%%a

See More: how to read ini files in win batch?

Report •

December 23, 2010 at 05:34:15

Report •
Related Solutions

Ask Question