回复 1# wuyuanwuyu - @echo off
- set "OldFile=a.txt"
- set "NewFile=b.txt"
- cd /d "%~dp0"
- for /f "tokens=13,14 delims=:" %%a in ('type "%OldFile%"') do (
- for /f "tokens=3 delims=/" %%i in ("%%a") do (
- set "MyIP=%%i"
- )
- for /f "tokens=1 delims=\" %%i in ("%%b") do (
- set "MyPort=%%i"
- )
- )
- echo>"%NewFile%" %MyIP%:%MyPort%
复制代码
|