用vbs会简单一些,bat会很累赘,楼主把old.txt改成你的文件名就可以了- @ECHO OFF
- Setlocal enableDelayedExpansion
- for /l %%i in (0,1,62) do (
- set /a count1=%%i+1&set count1=00!count1!&set count1=!count1:~-2!
- set str1=&set count=
- for /f "tokens=1,2" %%j in (old.txt) do (
- set str=%%k&set str=!str:~%%i,1!
- set str1=!str1! !str!&set /a count+=1
- if !count! geq 3 echo %%j !str1:~-5!>>!count1!.txt
- )
- )
复制代码
|