Search code examples
windowsbrowsercmddefaultfile-uri

How to Launch Default Browser to Open Local .html File


The default browser can be called to open an URL (http,https) through explorer.exe in cmd terminal:

> explorer https://google.com

However, .html files on my machine are already assigned to be opened using an editor, and Explorer will open HTML files in editor. For example, these will open editor:

> explorer test.html
> explorer file:///C:/Temp/test.html

How to open local HTML files in cmd using default browser?


Solution

  • try the start command:

    start file://C:/Temp/test.html