2016-01-20 106 views
-1

我有第一bat文件(myFileAll.bat),其具有批處理文件7

myFile1.bat ../project/MyApp1.exe 
myFile1.bat ../project/MyApp2.exe 
myFile1.bat ../project/MyApp3.exe 

myFile1.bat我傳遞%1%2%3作爲參數

但是隻有MyApp1.exe正在構建其餘兩個不是

+0

'myFile1.bat ../project/MyApp1.exe ../project/MyApp2.exe ../project/ MyApp3.exe'? – aschipfl

+0

myFile1.bat ../project/MyApp1.pro ../project/MyApp2.pro ../project/MyApp3.pro – Rays

+0

我也會在參數的每一邊使用引號。將有助於查看您的實際批處理文件,以查看您如何處理參數。 – Squashman

回答

1

如果您只是使用名稱執行輔助批處理文件,則將控制權交給它。如果完成,你回到commandprompt。

你必須callstart它控制返回到主腳本:

call myFile1.bat ../project/MyApp1.exe 
call myFile1.bat parameter1 parameter2 parameter3 
call myFile1.bat "Param 1 with spaces" "param two" "param 3"