1

I want to link local UNC path (windows network path) from my html. I tried many variations in anchor tag like,

 1. <a href="\\\\somemachine\\path">link</a>
 2. <a href="file://\\somemachine\\path">link</a>
 3. <a href="file://///\\somemachine\\path">link</a>
 4. <a href="\\somemachine\path">link</a>

But, nothing seems working. I have chromium nightly build and also tried t on Firefox. Is there is any path combination that can work or if through javascript, it is possible?

Camilo Martin
  • 37,236
  • 20
  • 111
  • 154
Gagandeep Singh
  • 5,755
  • 4
  • 41
  • 60
  • 1
    Look at the following comment on firefox - makes sense to me to forbid this... http://kb.mozillazine.org/Firefox_:_Issues_:_Links_to_Local_Pages_Don%27t_Work – home Sep 15 '11 at 17:47

2 Answers2

1

The correct URL schema to link against to local file system is

file://

after that, the rest of the UNC path follows. You must replace all backslashes by forward slashes and add one / to denote the file system root:

file://///somemachine/path

A shorter variant works in IE and Google Chrome:

file://somemachine/path
Tomalak
  • 332,285
  • 67
  • 532
  • 628
0

Like this:

file://somemachine//path
Eric
  • 95,302
  • 53
  • 242
  • 374