How to Open Multiple URLs in a Browser Using a Batch File

Table of Contents

Open multiple websites using a batch file

In some cases, you have several URLs, and you want to open them at once using a batch file.

To achieve that goal, you need to create a batch file and insert the following code:

@echo off
start "" http://google.com
start "" https://yahoo.com
start "" https://bing.com

In this post, we”ll trying to open Google, Yahoo and Bing at once.

How to Open Multiple URLs in a Browser Using a Batch File

The batch script stacks one start “” parameter on top of the other to open multiple tabs. You can replace the links provided with ones of your choosing.

How to Open Multiple URLs in a Browser Using a Batch File

Open sites with a specific browser using batch file

The above script will open sites with default browser in your computer. If you want to open the sites with a specific browser, let’s using the following commands:

Note

The Google Chrome must be installed in your computer before you run the batch file.

@echo off
start chrome.exe "http://google.com" 
start chrome.exe "https://yahoo.com"
start chrome.exe "https://bing.com"

Open sites with delay using batch file

In some cases, you want to add a delay of some seconds between each URL because they open all at once which freezes up the machine.

To do it, you need to add a timeout parameter into your batch file. In the below example, after the first one is opened, the script will wait for 10 seconds before starting the next one.

@echo on
start chrome.exe "http://google.com"
timeout /t 10 
start chrome.exe "https://yahoo.com"
timeout /t 10
start chrome.exe "https://bing.com"
pause

The output when you run the batch script.

Note

If you don’t want to show the script window at the end, let’s remove the parameter in the code.

How to Open Multiple URLs in a Browser Using a Batch File

Leave a Comment

Required fields are marked *