I am trying to open a local HTML file but I get an error every time that I do. The error message is as follow:
Error: Windows cannot access the specified device, path, or file. You may not have the appropriate permission to access the item
I have checked the properties of the file and I do have access to everything about it and I have tried other HTML files too. These files open perfectly on Microsoft edge and internet explorer, but not with Chrome. I have updated, repaired and reinstalled google chrome but to no avail. I remember a while back I was tinkering with RegEdit so that may be the issue? I am not 100% sure though as I was not editing Google Chrome files.
Thanks.
11 Answer
Easy way:
- Create a new shortcut for
chrome.exe. - Right click > Properties
- Change
Targetfrom"c:\path\to\chrome.exe"to"c:\path\to\chrome.exe" --allow-file-access-from-file. Click OK to save. - Run chrome using this shortcut
- Drag & drop html files to open.
Easier way:
- If you have
pythoninstalled, run cmd, change directory to your folder, runpython -m http.server - Or download Caddy server, run
caddy -port 80