虽然已结帖, 与其删掉, 不如发出来吧
MAKE.CMD
不同于 2 楼 的 more 输出方式, 这里采用 copy 文件拼接方式, setup_main.bat 是所有目标文件的后面的公共部分, make 只 echo 输出首行机器号- @echo off
- set /a orderNumMin=10001
- set /a orderNumMax=11000
- SETLOCAL ENABLEDELAYEDEXPANSION
- for /L %%k in (%orderNumMin% 1 %orderNumMax%) do (
-
- set "dirName=%%k"
- set "dirName=!dirName:~1!"
- title !dirName! processing...
- 2>nul md "!dirName!"
- >"!dirName!\setup.bat" (echo;set "LOCAL_MACHINE=6776037-!dirName!")
- >nul copy /y "!dirName!\setup.bat" + "a\setup_main.bat" "!dirName!\setup.bat"
- )
- SETLOCAL DISABLEDELAYEDEXPANSION
-
- cd /d "%~dp0"
- pause
- exit
复制代码 setup_main.bat 放在 a 目录中- cd /d "%~dp0"
-
-
- rem 此处修改后面的数字,默认是10,最大是99
- set /a orderNumMax=99
-
-
-
-
-
-
-
- set /a orderNumMin=1
- SETLOCAL ENABLEDELAYEDEXPANSION
- for /l %%k in (%orderNumMin% 1 %orderNumMax%) do (
- md web%%k
- set TEM_ORDER=00%%k
- set TEM_ORDER2=!TEM_ORDER:~-2,2!
- copy moban\WebIE.exe web%%k\WebIE%%k.exe
- copy moban\userconf.ini web%%k\userconf.ini
- copy moban\conf.exe web%%k\conf_%LOCAL_MACHINE%!TEM_ORDER2!.exe
- call web%%k\conf_%LOCAL_MACHINE%!TEM_ORDER2!.exe
- del web%%k\conf_%LOCAL_MACHINE%!TEM_ORDER2!.exe
- )
- SETLOCAL DISABLEDELAYEDEXPANSION
- %~d0
- cd %~dp0
-
- exit
复制代码
|