本帖最后由 terse 于 2013-8-19 23:51 编辑
ie 编辑下- @echo off
- for /f "delims=U" %%a in ('cmd /u/c echo,唉') do set "tab=%%a"
- for /f "tokens=1-3delims=-./" %%a in ("%date:~,10%") do (
- set /a yy=%%a,mm=1%%b-100,dd=1%%c-100
- )
- type call_history_2013-08.csv |findstr /i %yy%年%mm%月%dd%日>b.txt
-
- (for /f "tokens=1-7delims=;" %%a in (b.txt)do (
- for /f %%i in ("%%~a") do echo,%%g %%i%tab%%%~c%tab%%%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 $
- pause
复制代码
|