08/07/28 18:12:30 koYrOCln
俺はこう
SETLOCAL
SET tsselectpath="TSselectのパス"
SET b25path="b25のパス"
SET TsSpath="TsSplitterのパス"
:start
IF "%~1"=="" GOTO owata
IF NOT "%~x1" == ".ts" GOTO next
%tsselectpath% "%~1" > "%~dpn1_tsselect.log"
FOR /F "usebackq tokens=*" %%I IN (`FIND /V /C "scrambling=0" "%~dpn1_tsselect.log"`) DO SET scrambling=%%I
IF %scrambling:~-1% == 0 GOTO end
FIND /V "scrambling=0" "%~dpn1_tsselect.log"
RENAME "%~1" "%~n1_bak.ts"
%b25path% "%~dpn1_bak.ts" %~1
del "%~dpn1_bak.ts"
:end
del "%~dpn1_tsselect.log"
%TsSpath% -1SEG "%~1"
del "%~1"
ren "%~dpn1_HD.ts" "%~n1.ts"
:next
SHIFT
GOTO start
:owata
ENDLOCAL