Solved

What's wrong with my batch file?

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:

http://s4.postimage.org/7qEzJ.jpg
4 answers Last reply Best Answer
More about what wrong batch file
  1. That folder is not (I presume) in the default PATH variable. Put the full path to the program in your batch file:

    start "C:\Program Files\Mozilla Firefox\firefox.exe"
  2. 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.
  3. Best answer
    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"
    )
  4. Best answer selected by Advice Pro.
Ask a new question

Read More

Programming Firefox Notepad Error Message Apps