|
正好练习一下:
@echo off
set ser_1=oldname
set ser_2=newname
set ser_3=mac
for /f "eol=/ usebackq tokens=1,2 delims==" %%i in (net.ini) do (if %%i==%ser_1% set %ser_1%=%%j)
for /f "eol=/ usebackq tokens=1,2 delims==" %%i in (net.ini) do (if %%i==%ser_2% set %ser_2%=%%j)
for /f "eol=/ usebackq tokens=1,2 delims==" %%i in (net.ini) do (if %%i==%ser_3% set %ser_3%=%%j)
echo 结果如下:
echo oldname = %oldname%
echo newname = %newname%
echo mac = %mac%
echo.
pause
|
评分
-
查看全部评分
|