- @echo off
- (for /f "delims=" %%a in (win.ini) do (
- if defined t (
- set t=
- echo LastLogin=zl
- )else echo;%%a
- if %%a==[山东电力集团公司PMS系统] set t=1
- ))>tmp.ini
复制代码 或者判断当前行是否为 LastLogin=xxx :- @echo off
- (for /f "delims=" %%a in (win.ini) do (
- for /f "delims==" %%b in ("%%a") do (
- if %%b==LastLogin (
- echo LastLogin=zl
- ) else echo;%%a
- )
- ))>tmp.ini
复制代码 如果要覆盖原文件,在脚本末尾加一句:复制代码 |