xiayukun 当前离线
列兵
Batcher 当前离线
管理员
@echo off setlocal enabledelayedexpansion set "port=" REM 假设你运行的命令是 findstr /c:"PORT =" 1.txt for /f "delims=" %%a in ('findstr /c:"PORT =" 1.txt') do ( set str=%%a set str=!str:~-15! set str=!str:*PORT=! set str=!str:~3,-2! set port=!port! !str! ) set port=!port:~1! echo !port! pause复制代码
TOP