Tuesday, November 25, 2014

#SharePoint | An "Open with Explorer" tale


I started this mini-project saying to myself:
If I work with Firefox, why can't I get "Open with Explorer".

Soon I realized that I was in way over head.
SharePoint's tight coupling to Internet Explorer, on top of security mechanisms of the web, make trying this a bumpy road.
After many attempts failed, I eventually gave up, but not before I defined a workaround, which would allow me to have something similar, not "one-click" but almost...


Some post-attempt observations:
- Trying to re-use the "built-in" functionality quickly seems to be a showstopper.
- Trying to call an URL with file:// seems to have worked in the past, but due to new browser security mechanisms, it no longer works

1. Install grease monkey

2. Add a script
Click "New user script..." from the Grease Monkey context menu.

3. Include jQuery
Edit the script and in the end, add a few empty lines, then paste the below to start up.

var $ = unsafeWindow.jQuery;

4. Add a button to a website

5. Open the current library in explorer

Now, the catch.
I'm not really starting the explorer window, but I am providing the means to do so.
I return a prompt with the exact UNC path of the library so I can easily copy-paste it into a "win+r" dialog, or in a plain explorer view, previously opened.
It may seem a bit "tweaky", but for me as a developer, I like it.
I mean, if I use other browsers on a day-to-day basis, why should I have to open IE, map a folder, or even browse folder by folder in the file system to do this?

click the new explorer icon

copy the URL

 paste it in a Win+R window

navigate through your current browser URL folder

Full script:

  • Get a link to the current SharePoint folder on any URL (not just document libraries)
  •  Works on all sites, without any custom code

  • Local, per browser setting
  • Doesn't open file explorer directly

Other useful links:



Moved to CodePlex at https://spdevtools.codeplex.com/

No comments:

Post a Comment