0

How i will open the following link

<a href=file:///blablabla/folder>Open folder</a>

It is not opening on clicking the anchor.

I mean to say that if we want to access shared folder. Like from \192.168.10.1\XYZ, then.

Devi
  • 90
  • 1
  • 3
  • 2
    Some clarification would be welcome. What language/environment are you using for your web application? – James P. Dec 23 '09 at 12:20
  • I am using ASP.NET 3.5 with C#. I am running the application in Windows XP os with mozilla firefox browser. – Devi Dec 23 '09 at 12:27
  • Do you mean to open the folder inside the browser, or to launch an external application, like nautilus or Windows explorer? – Jeff Puckett Oct 06 '16 at 11:48

3 Answers3

0

Are you specifying an absolute path? For example, the following will work fine in Windows:

<a href="file:///C:\MyFolder">Open folder</a>

Note also that you missed the quotes around the folder path.

Konamiman
  • 49,681
  • 17
  • 108
  • 138
  • I am sorry, i mean to say that if we want to access shared folder. Like from \\192.168.10.1\XYZ, then. – Devi Dec 23 '09 at 12:28
0

The file:

<a href=file:///tmp>Open folder</a>

works fine for me under Ubuntu 9.10 in Firefox 3.5.5 as does:

<a href="file:///tmp">Open folder</a>

which is probably better. I suspect you may be having another issue. If you're doing this on a Windows server, you may need the drive letter as well.

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
0

I'm able to do this from windows:

<HTML>
    <HEAD>
        <TITLE>My UNC Opener</TITLE>
    </HEAD>
    <BODY>
        <a href="\\192.168.10.1\XYZ">Testing</a>
    </BODY>
</HTML>

Please note that most modern browsers know how to append the file:/// prefix to something referenced on the filesystem, however, Firefox (Tested with version 3.5.6) requires it. Thus, your code should look like this for the same example:

<HTML>
    <HEAD>
        <TITLE>My UNC Opener</TITLE>
    </HEAD>
    <BODY>
        <a href="file:\\\\\192.168.10.1\XYZ">Testing</a>
    </BODY>
</HTML>

Yes, thats five (5) backslashes (\) in there.

Hope this helps,

Thanks!

Scott
  • 2,183
  • 18
  • 33
  • Thanks for the research & Good point but when i am running this in local machine it is working fine but when i am running it in server it is not working specially for FF 3.5.6. I am developing my application in ASP.NET 3.5 framework. – Devi Dec 24 '09 at 05:20
  • and one more thing is, i have given the target as "_blank" for opening it in new tab. The href is correct but on clicking it is not opening in FF but opening in IE. – Devi Dec 24 '09 at 05:30