下面的批处理文件实现了与原始代码相同的过程,但它进行了细微的修改,使代码更清晰并显示了已处理文件的名称。请注意,我不知道您的代码应该实现什么!
@echo off
setlocal EnableDelayedExpansion
for %%a in (20 40 80) do (
for %%b in (80 160) do (
for /l %%c in (1,1,3) do (
for /l %%d in (1,1,10) do (
for /l %%e in (1,1,6) do (
rem Just process values of %%f greater than %%e
set /A f=%%e+1
for /l %%f in (!f!,1,6) do (
echo ordersheet_%%a_%%b_%%d c=%%c, d=%%d, e=%%e, f=%%f
if exist ordersheet_%%a_%%b_%%d (
echo " " %%e %%f >> output.txt
START ThesisVelo.exe distancematrix_%%a.txt ordersheet_%%a_%%b_%%d %%c %%d %%e %%f >> output.txt
)
)
)
)
)
)
)
输出的一些部分:
ordersheet_20_80_1 c=1, d=1, e=1, f=2
ordersheet_20_80_1 c=1, d=1, e=1, f=3
ordersheet_20_80_1 c=1, d=1, e=1, f=4
ordersheet_20_80_1 c=1, d=1, e=1, f=5
ordersheet_20_80_1 c=1, d=1, e=1, f=6
ordersheet_20_80_1 c=1, d=1, e=2, f=3
ordersheet_20_80_1 c=1, d=1, e=2, f=4
ordersheet_20_80_1 c=1, d=1, e=2, f=5
ordersheet_20_80_1 c=1, d=1, e=2, f=6
ordersheet_20_80_1 c=1, d=1, e=3, f=4
ordersheet_20_80_1 c=1, d=1, e=3, f=5
ordersheet_20_80_1 c=1, d=1, e=3, f=6
ordersheet_20_80_1 c=1, d=1, e=4, f=5
ordersheet_20_80_1 c=1, d=1, e=4, f=6
ordersheet_20_80_1 c=1, d=1, e=5, f=6
ordersheet_20_80_2 c=1, d=2, e=1, f=2
. . .
ordersheet_20_80_2 c=1, d=2, e=5, f=6
ordersheet_20_80_3 c=1, d=3, e=1, f=2
. . .
ordersheet_20_80_3 c=1, d=3, e=5, f=6
ordersheet_20_80_4 c=1, d=4, e=1, f=2
. . .
ordersheet_20_80_4 c=1, d=4, e=5, f=6
ordersheet_20_80_5 c=1, d=5, e=1, f=2
. . .
ordersheet_20_80_5 c=1, d=5, e=5, f=6
ordersheet_20_80_6 c=1, d=6, e=1, f=2
. . .
ordersheet_20_80_6 c=1, d=6, e=5, f=6
ordersheet_20_80_7 c=1, d=7, e=1, f=2
. . .
ordersheet_20_80_7 c=1, d=7, e=5, f=6
ordersheet_20_80_8 c=1, d=8, e=1, f=2
. . .
ordersheet_20_80_8 c=1, d=8, e=5, f=6
ordersheet_20_80_9 c=1, d=9, e=1, f=2
. . .
ordersheet_20_80_9 c=1, d=9, e=5, f=6
ordersheet_20_80_10 c=1, d=10, e=1, f=2
. . .
ordersheet_20_80_10 c=1, d=10, e=5, f=6
The same block above with c=2 and c=3 until:
ordersheet_20_80_10 c=3, d=10, e=5, f=6
The same whole block above, from:
ordersheet_20_160_1 c=1, d=1, e=1, f=2
until:
ordersheet_20_160_10 c=3, d=10, e=5, f=6
The same whole block above, from:
ordersheet_40_80_1 c=1, d=1, e=1, f=2
until:
ordersheet_40_160_10 c=3, d=10, e=5, f=6
The same, from:
ordersheet_80_80_1 c=1, d=1, e=1, f=2
until:
ordersheet_80_160_10 c=3, d=10, e=5, f=6