本帖最后由 CrLf 于 2013-8-4 22:08 编辑
来个有合计的:- @echo off
- %1 goto main
-
- for /f "delims=U" %%a in ('cmd /u /c echo 唉') do set "tab=%%a"
- for /f "tokens=3,7 delims=;" %%a in (a.txt) do (
- echo %%~a%tab%%%b
- for /f "tokens=1-3 delims=:" %%i in ("%%b") do set/a h+=1%%i%%100,m+=1%%j%%100,s+=1%%k%%100
- )
- set/a m+=s/60,s=s%%60+100,h+=m/60,m=m%%60+100
- if %h% lss 10 set h=0%h%
- echo 合计: %h%:%m:~-2%:%s:~-2%
- exit/b
-
- :main
- call %0 : 2>nul | more /t20 | sort /+20 /r /o b.txt
- pause
复制代码
|