返回列表 发帖
@echo off
rem 批处理保存为utf-8编码格式
chcp 65001 >nul
set t1=00:00:00,000
(for /f "tokens=1* delims=[]" %%i in ('find /n /v "" ^<"%~1"') do (
if "%%j" neq "" (
for /f "tokens=1-3" %%x in ("%%j") do (
if "%%y" equ "-->" (
setlocal enabledelayedexpansion
for /f "tokens=1-4 delims=:," %%a in ("%%z") do (
set /a "t2ms=((1%%a%%100*60+1%%b%%100)*60+1%%c%%100)*1000+1%%d%%1000,p=t2ms%%100%%20"
if !p! leq 10 (
set /a t2ms-=p
) else (
set /a t2ms+=20-p
)
)
set /a "h=t2ms/1000/60/60+100,m=t2ms/1000/60%%60+100,s=t2ms/1000%%60+100,ms=t2ms%%1000+1000"
set t2=!h:~1!:!m:~1!:!s:~1!,!ms:~1!
echo !t1! --^> !t2!
for /f "delims=" %%t in ("!t2!") do (
endlocal
set t1=%%t
)
) else (
echo=%%j
)
)
) else (
echo=
)
))>$
move $ "%~1"
pauseCOPY
bat小白,请多指教!谢谢!

TOP

返回列表