Let's say, configuration list in config.ini is as:

abc=abc
a=a
localpath=D:\local\path

 To read the key-value, we create a test.bat:

@echo off
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('type "config.ini"^| find /i "="') do set %%i
echo %a%
echo %abc%
echo %localpath%

Drop config.ini and test.bat to the same folder then run test.bat from command prompt you'll see the result.

 

相关文章:

  • 2021-12-07
  • 2018-03-14
  • 2021-06-03
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
  • 2022-12-23
相关资源
相似解决方案