22

On a Website for our internal use i show links to local files and folders. the links are like this:

href="file://C:/example/"
href="file://C:/example/test.odt"

The Problem is now that the link to the directory does open in firefox itself with a useless directory listing. Useless because you can just see the files or open them but not copy, insert, delete... The link to the file work normal and the file is opend by OpenOffice. By changing the configuration of firefox and setting the following key to false I can open the directory in with explorer.exe but for the file I have to choose the right application.

network.protocol-handler.expose.file

Does someone know a way to get both to work like i want? Means that the Directory is shown by explorer.exe and all files are opened by the right application. This can be by configuring Firefox or windows, changing the links, or even by writing a small program which opens all the file protocol correctly and will be used as protocol handler for the file protocol in firefox.

Thanks Raffael

Strelok
  • 50,229
  • 9
  • 102
  • 115
raffael
  • 2,427
  • 4
  • 26
  • 42

5 Answers5

23

I did the above with small changes in Firefox 14.0.1, which works for me:

  1. Create new boolean value network.protocol-handler.expose.file and set it to false
  2. Create new boolean value network.protocol-handler.external.file and set it to true
  3. Click on a link to a local folder.
  4. In the following prompt, link to the explorer.exe in: C:\Windows\explorer.exe

Files are now open with the default application, folders are open with the Windows Explorer!

RangerJo
  • 391
  • 2
  • 7
  • I first thought that your solution works. Maybe it does with windows 7 or 8. But with our XP it does not. Well the directory opens with windows explorer but the files are opened with internet explorer. And the IE asks me if i want to download them. Thanks anyway – raffael Dec 04 '12 at 12:46
  • Why use XP ? ;) – Svetoslav Marinov Jan 21 '17 at 13:17
  • Thank you, RangerJo; you're a life-saver. All these years later, this works on Firefox 76 and Windows 7. – Bob Jun 10 '21 at 19:02
5

I know this is not quite what you want, but you might take a look at the "launchy" addon for firefox:

https://addons.mozilla.org/en-US/firefox/addon/81/

Using this addon you can right click on a file link, go to "launchy" sub-menu, and tell it to open in explorer. This will browse directly to the folder as you want.

I want the same feature you want, however this "works" for now. I have asked the author of launchy to allow it to override the left-click behavior for certain protocols (so it would launch explorer with one click), but I don't have a response yet.

edit: Years later, I will post the solution I started using instead of Launchy:

https://addons.mozilla.org/en-us/firefox/addon/local-filesystem-links/

https://github.com/feinstaub/firefox_addon_local_filesystem_links

This scans for file:// links and makes them clickable. It does inject some HTML which can mess with formatting if you aren't careful, but it does the job.

Dan
  • 1,823
  • 16
  • 18
  • Thanks. i haven't seen this addon yet. I also tried some "IE Tab" addons (IE Tab 2 and IE Tab plus), where you can configure url based behaviour. I had some problems but tested only very short. I will go back to that problem later. – raffael Jun 25 '10 at 11:03
3

In about:config You need to add a boolean value with the name network.protocol-handler.expose.file and set it to false and also create a string value with the name capability.policy.default.checkloaduri.enabled and set it to allAccess.

Now you will be able to choose C:\Windows\explorer.exe to open file links.

Tested in FF 19.0.2 in Windows 7.

0

Or You can use the Plugin "Local Filesystem Links" (DE version of the page) now.

-- edit: Link for EN version: https://addons.mozilla.org/en-US/firefox/addon/local-filesystem-links/?src=search

Xavi Montero
  • 9,239
  • 7
  • 57
  • 79
Roland
  • 336
  • 2
  • 8
  • 2
    Please keep in mind that this addon requires the installation of an external programm, which is only available on Windows. – Oliver Feb 12 '19 at 08:50
0

Try this: Create new boolean value with the name network.protocol-handler.expose.file and set it to false

Create new boolean value with the name network.protocol-handler.external.file and set it to true

Open link to a local directory and on the now appearing box, register the "file"-protocol permanently with the "file"-programm (1st entry). There should now open the windows explorer. You can deassociate the type "file" in the Firefox-settings (applications-tab).

After that, a link to a document (i.e. file:///x:\dir\file.doc) worked automatically for me (FF8.0).

iDev
  • 23,310
  • 7
  • 60
  • 85
Mikel
  • 1
  • did you also test the latest firefox? i don't understand what to do in the Settings on the Application-Tab. I am using FF16.0.2 – Synox Nov 22 '12 at 07:11