我有兩個批處理腳本:呼叫在批處理腳本不會轉到指定的子程序在另一個批處理文件
Batch_A
echo You are in Batch A
call "%~dp0Batch_B.bat" BAR
Batch_B
:FOO
echo You are in Batch A and you have failed.
:BAR
echo You are in Batch A and you have succeeded.
對於我的生活,無論我用哪種方式對其進行語法分析,第一批中的第2行都不會調用Batch_B中的「BAR」子例程。
我已經嘗試過爲:
call "%~dp0Batch_B.bat BAR"
call "%~dp0Batch_B.bat" :BAR
call "%~dp0Batch_B.bat" %BAR%
call %~dp0Batch_B.bat BAR
沒有什麼工作。我知道這可能是一些基本的東西,但是我做錯了什麼?還有其他方法可以完成這個嗎?
不能完成。 – abelenky