[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. (Echo for /l %%%%i in ^(1,1,100^)do if not exist "比对%%%%i" set "folder=比对%%%%i"^&goto :next)>1.bat
复制代码

TOP

  1. (Echo @Echo off^&SetLocal EnableDelayedExpansion
  2. Echo for /l %%%%i in ^(1,1,100^)do if not exist "对比结果%%%%i" set "folder=对比结果%%%%i"^&goto :next
  3. Echo :next
  4. Echo if exist "对比结果\" ren "对比结果" "%%folder%%"
  5. Echo md 对比结果
  6. Echo for /f "delims=" %%%%i in ^(渠道交单数据.txt^)do ^(find /i "%%%%i" 对比结果\渠道交单已去重.txt^|^|echo %%%%i^>^>对比结果\渠道交单已去重.txt^)
  7. 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"
  8. Echo findstr /g:对比结果\渠道交单已去重.txt 后台错误数据.txt ^>对比结果\渠道错误数据.txt
  9. Echo set rowa=0
  10. Echo for /f %%%%a in ^(对比结果\渠道交单已去重.txt^)do if '%%%%a' neq '' set /a rowa+=1
  11. Echo set rowb=0
  12. Echo for /f %%%%b in ^(渠道交单数据.txt^)do if '%%%%b' neq '' set/a rowb+=1
  13. Echo echo 渠道交单%%rowb%%单 ^>对比结果\对比结果总结.txt
  14. Echo set /a rowd=%%rowb%%-%%rowa%%
  15. Echo echo 渠道交单重复%%rowd%%单 ^>^>对比结果\对比结果总结.txt
  16. Echo set rowc=0
  17. Echo for /f %%%%c in ^(对比结果\渠道错误数据.txt^)do if '%%%%c' neq '' set/a rowc+=1
  18. Echo echo 渠道交单错误%%rowc%%单 ^>^>对比结果\对比结果总结.txt
  19. Echo set rowe=0
  20. Echo for /f %%%%d in ^(对比结果\未入系统数据.txt^)do if '%%%%d' neq '' set/a rowe+=1
  21. Echo echo 未入系统%%rowe%%单 ^>^>对比结果\对比结果总结.txt
  22. Echo set /a youxiao=%%rowb%%-%%rowd%%-%%rowc%%-%%rowe%%
  23. Echo echo 统计有效为%%youxiao%%单 ^>^>对比结果\对比结果总结.txt
  24. Echo exit
  25. Echo pause)>1.bat
  26. pause
复制代码

TOP

返回列表