- @echo off
- for /f "delims=" %%i in ('dir /b /a-d *.srt') do (
- set /a n=0,m=1
- for /f "tokens=1* delims=[]" %%a in ('find /n /v "" ^<"%%i"') do (
- set "str=%%b"
- setlocal enabledelayedexpansion
- >>"%%~ni.P!m!.srt" echo=!str!
- endlocal
- if "%%b" equ "" (
- set /a n+=1,m=n/3+1
- )
- )
- )
- pause
复制代码
|