Tag Archives | bat

Learn to Write a Batch File with Firefox

Batch Files with FirefoxPardon me if I get a little geeky, but batch files are a great way to get tons of task done via your computer with little or no effort at all. You might have seen them before too – they contain a list of commands or program routines that the computer will execute in sequence. Also another trait they have is they are saved with the .bat extension.

How do you write a batch file? Start notepad, and type in this:

@echo off
start firefox.exe

Then go to File then pick Save As… and save this as FirefoxTip.bat to your desktop. To test, double click the icon it created for you on the desktop. If successful, Firefox should open up. If you did something wrong, you’ll probably either get an error message or nothing will happen. Also as a side note brought up by Mirzas:

Location of firefox.exe must be inside the PATH environment variable for it to work from a batch file.

Now that is rather boring, isn’t it? You could start Firefox like this from a shortcut for Pete’s sake. Well remember the Launch Tabs from Run Box and More Command Line Firefox Tips? Try plugging some of those in after the firefox.exe statement in your own batch file to launch Firefox the way you want.

For another example, start notepad back up and type in this:

@echo off
start firefox.exe webhostingshow.com firefoxfacts.com mitchelaneous.com

Then go to File then pick Save As… and save this as MitchBlogs.bat to your desktop. Double click it on your desktop and a new Firefox browser should come up with those three web sites loaded into the tabs.

For more help with batch files, check out this post on WikiHow.com.

Check out the other posts in this series: