2011-05-13 60 views

回答

3

示例 -

IF EXIST test.txt start test.txt 
4

你知道,你可以做if /?help if

if exists file command 

對於多個命令(或使用else時),用括號括起來,即

if exists file (
    command1 
    command2 
) 
+0

或者我可以做的命令1 &&命令2 ? (喜歡btw的名字) – James 2011-05-13 21:17:39

+0

@James:&&表示command2只會運行,如果command1進程的退出代碼爲0,使用command1&command2運行command2無論如何 – Anders 2011-05-13 21:38:28

+0

@Anders謝謝你澄清 – James 2011-05-13 21:43:41

相關問題