- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /a-d *.srt') do (
- set n=0
- for /f "delims=" %%j in (%%i) do (
- set /a n+=1
- set /a "m1=n%%3"
- set /a "m2=(n-1)/9+1"
- echo,%%j>>%%~ni.P!m2!.srt
- if "!m1!"=="0" echo,>>%%~ni.P!m2!.srt
- )
- )
- pause
复制代码
|