- (Echo @Echo off^&SetLocal EnableDelayedExpansion
- Echo for /l %%%%i in ^(1,1,100^)do if not exist "对比结果%%%%i" set "folder=对比结果%%%%i"^&goto :next
- Echo :next
- Echo if exist "对比结果\" ren "对比结果" "%%folder%%"
- Echo md 对比结果
- Echo for /f "delims=" %%%%i in ^(渠道交单数据.txt^)do ^(find /i "%%%%i" 对比结果\渠道交单已去重.txt^|^|echo %%%%i^>^>对比结果\渠道交单已去重.txt^)
- Echo ^(for /f %%%%i in ^('type "对比结果\渠道交单已去重.txt"'^)do ^(set "OldStr=%%%%i"^&set "NewStr=!OldStr:~0,3!....!OldStr:~7,4!"^&findstr "!NewStr!" 系统后台数据.txt ^>nul 2^>^&1^|^|echo,%%%%i^)^)^>"对比结果\未入系统数据.txt"
- Echo findstr /g:对比结果\渠道交单已去重.txt 后台错误数据.txt ^>对比结果\渠道错误数据.txt
- Echo set rowa=0
- Echo for /f %%%%a in ^(对比结果\渠道交单已去重.txt^)do if '%%%%a' neq '' set /a rowa+=1
- Echo set rowb=0
- Echo for /f %%%%b in ^(渠道交单数据.txt^)do if '%%%%b' neq '' set/a rowb+=1
- Echo echo 渠道交单%%rowb%%单 ^>对比结果\对比结果总结.txt
- Echo set /a rowd=%%rowb%%-%%rowa%%
- Echo echo 渠道交单重复%%rowd%%单 ^>^>对比结果\对比结果总结.txt
- Echo set rowc=0
- Echo for /f %%%%c in ^(对比结果\渠道错误数据.txt^)do if '%%%%c' neq '' set/a rowc+=1
- Echo echo 渠道交单错误%%rowc%%单 ^>^>对比结果\对比结果总结.txt
- Echo set rowe=0
- Echo for /f %%%%d in ^(对比结果\未入系统数据.txt^)do if '%%%%d' neq '' set/a rowe+=1
- Echo echo 未入系统%%rowe%%单 ^>^>对比结果\对比结果总结.txt
- Echo set /a youxiao=%%rowb%%-%%rowd%%-%%rowc%%-%%rowe%%
- Echo echo 统计有效为%%youxiao%%单 ^>^>对比结果\对比结果总结.txt
- Echo exit
- Echo pause)>1.bat
- pause
复制代码
|