回复 1# yonghu123 - @echo off & setlocal enabledelayedexpansion
- set "T= "
- >2.txt (
- for /f "delims=" %%l in (1.txt) do (
- for /f "tokens=1-7 delims= " %%a in ("%%l") do (
- set "a=%%a!T!" & set "b=%%b!T!" & set "c=%%c!T!" & set "d=%%d!T!" & set "e=%%e!T!" & set "f=%%f!T!"
- echo !a:~0,12!!b:~0,8!!c:~0,8!!d:~0,8!!e:~0,8!!f:~0,15!%%g
- )
- ))
-
- >3.txt (
- for /f "delims=" %%l in (1.txt) do (
- for /f "tokens=1-5 delims= " %%a in ("%%l") do (
- set "a=%%a!T!" & set "b=%%b!T!" & set "c=%%c!T!" & set "d=%%d!T!"
- echo !a:~0,12!!b:~0,8!!c:~0,8!!d:~0,8!%%e
- )
- ))
复制代码
|