@echo off
set list%=0 1 2 3 4 5 6 7 8 9 A B C D E F
for %%a in (%list%) do (
for %%b in (%list%) do (
for %%c in (%list%) do (
for %%d in (%list%) do (
for %%e in (%list%) do (
for %%f in (%list%) do (
for %%g in (%list%) do (
for %%h in (%list%) do (
echo.%%a%%b%%c%%d-%%e%%f%%g%%h&pause
)
)
)
)
)
)
)
)
)
Originally posted by chishingchan at 2008-7-14 13:27:
请教版主具体代码如何?
比如将任务分成16份,A主机负责处理Axxx-xxxx,那么代码就是:
@echo off
set list%=0 1 2 3 4 5 6 7 8 9 A B C D E F
for %%b in (%list%) do (
for %%c in (%list%) do (
for %%d in (%list%) do (
for %%e in (%list%) do (
for %%f in (%list%) do (
for %%g in (%list%) do (
for %%h in (%list%) do (
echo.A%%b%%c%%d-%%e%%f%%g%%h&pause
)
)
)
)
)
)
)
)