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