本帖最后由 smss 于 2020-5-21 13:03 编辑
| for /f "delims=" %%i in (D:\test\a.txt) do (set "hello=%%i" | | start /wait %py_exe% %cmd1% %hello% | | )COPY |
同理把%cmd1%也写成这种就可以套嵌 节约大量类似重复代码
例如 *.py和a.txt需保持顺序一致 | @echo off | | for /r "D:\test" %%a in (*.py) do (for /f "delims=" %%b in (D:\test\a.txt) do ( | | start /wait "D:\Python37\pythonw.exe" "%%a" "%%b" | | ))COPY |
|