原帖由 tmplinshi 于 2011-1-17 18:15 发表
@echo off
for /f "tokens=*" %%a in ('findstr "您的激活码:" 123.txt') do set var=%%a
set "var=%var:*您的激活码:=%"
>>124.txt echo %var:~0,22%
@echo off
SetLocal EnableDelayedExpansion
(for /f "tokens=*" %%a in ('findstr "您的激活码:" 123.txt') do (
set var=%%a
set var=!var:*您的激活码:=!
echo !var:~0,23!
)) >>124.txt