-1

i have this files here about three hundred file.

form1.exe
form2.exe
form3.exe
form4.exe
form5.exe
form6.exe
form7.exe
form8.exe
form9.exe
at
form300.exe

i need batch file has a text input to run form3.exe at form7.exe and another example run from form212.exe at form300.exe

i coded this may it help

set /P from=from: %=%
set /P to=to: %=%
start Form%from%.exe at form%to%.exe

example

first input : 3
second input : 7
this will open form3.exe form4.exe form5.exe form6.exe and form7.exe

any help please

4

1 回答 1

0

这将在您输入的范围内启动所有 form*.exe。

如果您想按顺序启动它们,而不是一次全部启动,请使用 /w启动命令中的开关。

@echo off
set /P "from=from: "
set /P "to=to: "
for /L %%a in (%from%,1,%to%) do start "" Form%%a.exe
于 2013-10-28T22:44:04.180 回答