Board logo

标题: [其他] 请教这段代码的问题 [打印本页]

作者: chouxia    时间: 2018-7-31 09:51     标题: 请教这段代码的问题

  1. @echo off
  2. Setlocal enabledelayedexpansion
  3. cd /d E:\ttt\qshell-v2.1.8
  4. for /l %%z in (1,1,683) do (
  5. set num=%%z
  6. echo @echo off>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  7. echo cd /d E:\ttt\qshell-v2.1.8>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  8. echo for /f "tokens=1,2,3,4,5,6,7,8,9,* delims= " %%%%a in ('type E:\ttt\qshell-v2.1.8\qiniufin1\fin!num!.txt') do (>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  9. echo set filename=%%%%a>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  10. echo set ts2d=%%%%b>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  11. echo call :main>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  12. echo )>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  13. echo :main>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  14. echo for /f "tokens=1,2,3,4,5,6,7,8,9,* delims= " %%%%d in ('E:\ttt\qshell-v2.1.8\qshell-windows-x64.exe tns2d !ts2d!') do (>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  15. echo set datt=%%%%d>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  16. echo echo !filename! !datt!>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  17. echo echo !filename! !datt!>>E:\ttt\qshell-v2.1.8\qiniufin2\!num!fin2.txt>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  18. echo )>>E:\ttt\qshell-v2.1.8\!num!fin2.bat>>E:\ttt\qshell-v2.1.8\!num!fin2.bat
  19. )
  20. echo exit
复制代码
执行后提示此时不应有do   但我没发现问题,哪位帮忙看看!?
拜谢拜谢
作者: Batcher    时间: 2018-7-31 10:21

不建议使用 echo 这种方法,可以换成这样试试:
https://mp.weixin.qq.com/s/McvY4CiR-SYGaCha7lmjIw




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2