2014-04-21 53 views
0

我有一個批處理文件如下如何更改批處理文件中的目錄?

E: 

cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core 

mvn clean install 

cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset 

mvn clean install 

它會爲核心

運行mvn install命令,但它不會對手機項目執行mvn install命令。

+0

手機文件夾中是否存在mvn?它是一個批處理文件嗎? – foxidrive

回答

0

嘗試這樣的:

pushd "E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core" 
mvn clean install 
popd 

pushd "cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset" 
mvn clean install 
popd 
1

這是不斷變化的驅動器和文件夾的另一種方法。

call命令是爲了解決這個問題,如果mvn是批處理文件。

cd /d "E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core" 
call mvn clean install 

cd /d "cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset" 
call mvn clean install 

mvn必須存在於這兩個文件夾中才能運行。

相關問題