What's wrong with my batch file?

Advice Pro

Distinguished
Feb 25, 2009
29
0
18,580
0
I wrote my first batch file in Notepad and save it as Firefox.bat:

@echo off
start firefox.exe


When I ran Firefox.bat, I got an error message reading:

Windows cannot find 'firefox.exe'. Make sure you typed the name correctly, and then try again.


Firefox.exe it's clearly in its folder:

 

Ijack

Distinguished
No, No:

@echo off
start "C:\Program Files\Mozilla Firefox\firefox.exe"

(Actually, the "start" is redundant. You could just put

@echo off
"C:\Program Files\Mozilla Firefox\firefox.exe"
)
 

Advice Pro

Distinguished
Feb 25, 2009
29
0
18,580
0
So, like this:

@echo off
start firefox.exe
"C:\Program Files\Mozilla Firefox\firefox.exe"

Even though this starts up Firefox, I still get the error message.
 

Ijack

Distinguished
No, No:

@echo off
start "C:\Program Files\Mozilla Firefox\firefox.exe"

(Actually, the "start" is redundant. You could just put

@echo off
"C:\Program Files\Mozilla Firefox\firefox.exe"
)
 
Thread starter Similar threads Forum Replies Date
A Apps General Discussion 1
O Apps General Discussion 6
A Apps General Discussion 2
Z Apps General Discussion 8
D Apps General Discussion 5
L Apps General Discussion 1
B Apps General Discussion 3
A Apps General Discussion 2
A Apps General Discussion 13
B Apps General Discussion 2
A Apps General Discussion 5
D Apps General Discussion 1
S Apps General Discussion 2
V Apps General Discussion 1
S Apps General Discussion 4
L Apps General Discussion 8
A Apps General Discussion 1
G Apps General Discussion 3
H Apps General Discussion 10
Wing0 Apps General Discussion 8

ASK THE COMMUNITY