回复 2# wangxiaodong
不需要- @echo off
- setlocal enabledelayedexpansion
- set "NewIP="
- set /p NewIP=请输入IP地址:
- echo 正在修改a.bat.............
- (for /f "delims=" %%i in (a.bat) do (
- set a=%%i
- if "!a:ftp -s=!" neq "!a!" (
- set OldIP=!a:*ftpfile =!
- call echo %%a:!OldIP!=!NewIP!%%
- ) else (
- echo,%%i
- )
- ))>a.txt
- move /y a.txt a.bat
- echo a.bat修改已成功
- pause
复制代码
|