12

Using Google Chrome Dev Channel on Windows, I have multiple local HTML files in one folder:

directory contents

And I want to open them all at once in one Google Chrome window as separate tabs:

google chrome with multiple tabs

What I tried and did not succeed:

  • Selecting all files in Windows Explorer and dragging them into Chrome (only one file was opened)
  • Selecting all files in Windows Explorer and right-clicking then "Open" (a blank new Chrome window opened)
  • Selecting all files in Windows Explorer and pressing Enter (a blank new Chrome window opened)
  • Using the file open dialog in Chrome (only single selection supported)

So what seemed to be a trivial task to me seems to actually be impossible.

How can I open multiple local HTML files at once in Google Chrome?

random
  • 15,201
Uwe Keim
  • 2,112

6 Answers6

14

You can achieve this by adding Chrome to "Send to" and then "sending" your desktop files/images there.

guest
  • 141
5

You can drag and drop multiple HTML files on a shortcut to Chrome (on the Desktop for instance) to open all those files in new tabs in the browser. Alternatively, you can open the Chrome installation folder (possibly C:\Program Files (x86)\Google\Chrome\Application) in another Windows Explorer and drop your file directly on the chrome.exe executable.

Note that this does not work on icon of pinned software in the Taskbar on Windows 8+ (but it will probably work on a shortcut in a custom toolbar).

5

I'm not sure if this is the best solution, but it worked for me. This was previously answered here.

You can just create a new text file and change the file extension to .bat then type something like this:

start chrome.exe http://www.google.com
start chrome.exe file-path-here    
start chrome.exe another-file-here

Then all you have to do is double click that file and they'll all open up in different tabs.

Uwe Keim
  • 2,112
Dan Hogan
  • 211
3

This is what I came up with:

forfiles /M *.html /C "cmd /c start chrome @file"

Yes… this is the actual syntax (sadly) you would use from the directory which contains the files. Simply hold shift and right click in your explorer window to select Open command window here from the context menu, and toss in this command to open files at your leisure.

Here is a link to more information on the command.

aaiezza
  • 131
2

On Linux, you can just put all your files as arguments in the command line. In the folder where your files are:

google-chrome file1.html file2.html
google-chrome *.html

This will open the files as separate tabs in the browser.

0

To extend the answer from Dan Hogan, you can also write them all in one line:

start chrome.exe http://www.google.com file-path-here another-file-here stackoverflow.com

Or if you prefere Firefox:

start firefox.exe http://www.google.com file-path-here another-file-here stackoverflow.com
rzickler
  • 216