好像标题中这个自动查找是多余的吧(因为楼主指定了目录):- @echo off&setlocal enabledelayedexpansion
- set "push=d:\progra~1\bai_pg\bsp\client\bsp.ini"
- for /f "delims=" %%a in (%push%) do (
- set "str=%%a"
- if not defined flag (
- echo !str:192.168.1.2=192.168.2.222!>%push%
- set "flag=a"
- ) else (
- echo !str:192.168.1.2=192.168.2.222!>>%push%
- )
- )
-
复制代码
|