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

14,356

Solution 1

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.

Solution 2

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

Solution 3

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).

Solution 4

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.

Solution 5

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.

Share:
14,356

Related videos on Youtube

Uwe Keim
Author by

Uwe Keim

German developer. Some of my apps: SharePoint Systemhaus Göppingen (zwischen Stuttgart und Ulm) Eigene Homepage erstellen Test Management Software Windows 10 Ereignisanzeige Very proud father of Felix (2012) and Ina (2014). Loves running, climbing and Indian food. Code Project member #234.

Updated on September 18, 2022

Comments

  • Uwe Keim
    Uwe Keim almost 2 years

    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?

  • xypha
    xypha over 8 years
    add short cut to chrome to "send to" by dragging & dropping the chrome link to this folder %AppData%\Microsoft\Windows\SendTo
  • igor
    igor about 7 years
    Awesome! This is the best solution so far! Works in Windows 10.
  • Oskar Austegard
    Oskar Austegard over 5 years
    +1 - this also conveniently works on Macs
  • kakyo
    kakyo about 5 years
    This should be the accepted answer!
  • Thom Ives
    Thom Ives almost 4 years
    This helped me greatly. I even modified it into a subprocess method using python. I explained how I leveraged this in this answer stackoverflow.com/a/63749975/996205