Tuesday, 13 August 2013

IF EXIST...ELSE not executing as expected IF EXIST run chrome ELSE run IE

IF EXIST...ELSE not executing as expected IF EXIST run chrome ELSE run IE

I wrote this so I don't need to dawdle around each time I go to a new
computer to work on java. I'm sure by reading it you can tell what I am
trying to achieve so I wont bore you with the details.
The main problem being she doesn't work ;p I'm following the syntax guide
lines from here --> http://ss64.com/nt/if.html <-- when I click on the bat
I see the terminal screen run the script but nothing happens.
Excuse my ignorcence if its something basic but this is close to the first
time I needed a batch file.
IF EXISTS C:\Users\{USER}\AppData\Local\Google\Chrome\Application\chrome.exe
(
chrome
sleep1
start "javatut"
"http://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html"
start "javaapi" "http://docs.oracle.com/javase/6/docs/api/"
)
ELSE
(
iexplore
sleep1
start "javatut"
"http://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html"
start "javaapi" "http://docs.oracle.com/javase/6/docs/api/"
)

No comments:

Post a Comment