Open multiple firefox tabs using a batch file

Hi! Just want to share this with you guys. I know this is very elementary but I find it useful. I was reading though tipidpc before I got this idea from one of the threads there. I usually open many tabs, all the same tabs in my firefox browser everyday. Now, after I read the post from tipidpc that he wants to open multiple browser windows I thought it would be a good idea if I did it too with firefox. So I tried to get some idea from the posted command line codes and researched some arguments pertaining to running firefox in the command line. Here's the end result

 

@ECHO OFF
REM Opens multiple tabs for firefox
REM For some sites it might be possible to append parameters like
REM www.website.com?username=<username>&password=<password>
SET BROWSER=firefox.exe
SET WAIT_TIME=2
START %BROWSER% -new-tab "mail.yahoo.com"
@ping 127.0.0.1 -n %WAIT_TIME% -w 1000 > nul
START %BROWSER% -new-tab "javaranch.com"
START %BROWSER% -new-tab "devpinoy.org"
START %BROWSER% -new-tab "tipidpc.com"
START %BROWSER% -new-tab "pinoyforum.net"
START %BROWSER% -new-tab "meebo.com"
START %BROWSER% -new-tab "google.com"

 and I just save it to a batch(.bat) file.

There is actually an option in firefox to open previously opened windows. But I prefer doing it this way since I only have to click the batch file and voila! Every website I often visit are open! I hope you guys find this useful! Thanks to the guys at tipidpc.

Published 08-24-2007 1:43 AM by lamia

Comments

Friday, August 24, 2007 5:13 AM by Dwarvend

# re: Open multiple firefox tabs using a batch file

whats the purpose of ping?

Sunday, August 26, 2007 2:56 AM by lamia

# re: Open multiple firefox tabs using a batch file

Hi Dwarvend

Sorry to have not explained that. If you noticed, w/out it you'll end up opening multiple instances of firefox. I couldn't find a wait funtionality for DOS so I made this instead as a workaround. Also, if you noticeed, I used the  WAIT_TIME variable to set the delay in seconds.

I know it's stupid. So if you have a better idea, then I would be very glad to hear it. :)

Thursday, September 06, 2007 7:19 AM by zero_digit

# re: Open multiple firefox tabs using a batch file

hey nice post, bout the .batch files, how can I open another  browser and how to open a window folder using batch file...

thanks .... keep it up

Wednesday, June 04, 2008 8:53 AM by Darran Nash

# re: Open multiple firefox tabs using a batch file

You can also do it this way

@ECHO OFF

START FIREFOX.EXE WWW.GOOGLE.COM WWW.FACEBOOK.COM

Just simply leave a space between each web address.

Since there is no spaces in the url's there is no need for the ""

Friday, August 01, 2008 12:04 PM by O2Blitzer

# re: Open multiple firefox tabs using a batch file

This is awesome. I don't think it was a waste of time at all. And eventhough it's quite basic, I think it's simply brilliant! I'm not using the exact code you posted here Lamia, but this is good enough to allow me to open 100 tabs in one instance automatically!! Haha.

Now I can let my com do all the work while I sleep. Thank you for this post!! Very helpful indeed.

Wednesday, November 12, 2008 11:06 AM by Jnew

# re: Open multiple firefox tabs using a batch file

Thank you for posting this!  Works great for me :).

Saturday, November 15, 2008 10:23 PM by shri

# re: Open multiple firefox tabs using a batch file

nice post man !!!! it helped me a lot. Thnx

Sunday, November 30, 2008 2:02 PM by Tim

# re: Open multiple firefox tabs using a batch file

what if you wanted to open 3 diff. websited say every 5 min. in the same browser window ( i would use it to scan through my stock quotes on dif sites) can that be done?

Sunday, December 07, 2008 11:30 PM by Ravi Kiran

# re: Open multiple firefox tabs using a batch file

How about if I have a txt file of url's and open them on firefox on different tabs of a single window.