- @ECHO OFF & PUSHD %~DP0
-
- setlocal EnableDelayedExpansion
- SET "inifile=111.ini"
-
- FOR /F "usebackq eol=; tokens=1-2 delims==" %%a in ("%inifile%") do (
- FOR /F "tokens=1-2 delims=," %%x in ("%%a") do SET "x=%%x"&SET "y=%%y"
- FOR /F "tokens=1-2 delims=," %%x in ("%%b") do SET "x1=%%x"&SET "y1=%%y"
- ECHO.do something with x,y,x1,y1:!x!,!y!,!x1!,!y1!
- )
- pause
- exit /B
复制代码 SET "inifile=111.ini"这部分自己改吧,可以改成从参数%1传入 |