0
批處理腳本中的以下簡單步驟給我帶來了錯誤。它說如果批處理文件中的語句給出錯誤
'else' is not recognized as an internal or external command,
operable program or batch file.
) was unexpected at this time.
有些人可以幫忙嗎?
set var_machine64 = 0
if exist "C:\Program Files (x86)" (set var_machine64 = 1)
if !var_machine64! == 1 (
If exist "C:\Program Files (x86)\Microsoft" (
echo Microsoft folder not available
goto End))
else (
If exist "C:\Program Files \Microsoft" (
echo Microsoft folder not available
goto End))
:End
Exit
感謝喬伊的答案。這對我很有幫助。 –
_ ** ELSE ** **必須與** IF **的結尾處於同一行)「)... ...這些愚蠢的空白規則每次都會讓我感到厭倦。我希望這是更廣泛的知道/記錄/問及回答,因爲它很難谷歌。 – mmseng