稍微改下就可以了嘛- @echo off
- for /f "tokens=1-2delims=-./" %%a in ("%date:~,7%") do (
- set /a yy=%%a,mm=1%%b-100
- )
-
- (for /f "tokens=1-7delims=;" %%a in ('findstr %yy%年%mm%月 a.txt') do (
- for /f %%i in ("%%~a") do echo,%%g %%i %%~c %%g
- for /f "tokens=1-3 delims=:" %%i in ("%%g") do (
- set /a h+=1%%i-100,m+=1%%j-100,s+=1%%k-100
- )
- ))>$
-
- set /a k1=s/60,s=s%%60+100,m+=k1,k2=m/60,m=m%%60+100,h+=k2
-
- (
- for /f "tokens=1*" %%a in ('sort /r $') do echo,%%b
- echo,&echo,合计:%h%:%m:~1%:%s:~1%
- )>b.txt
- del $
复制代码
|