Batch IF ELSE statement both execute -


the batch file execute both commands in if , else. checked syntax , space, no idea wrong.

if exist c:\program files (x86)\google\chrome (     start chrome www.google.com ) else (     start iexplore www.google.com ) 

both chrome , ie opened if statement not working.

the space in path passed exist test confusing parser. in general should place quotes around such names.

if exist "c:\program files (x86)\google\chrome" (  start chrome www.google.com ) else (  start iexplore www.google.com  ) 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -