0

A similar question as been asked for example here.

Anyawy my need is not to open in browser the contents on the folder, like this:

<a href="file:///D:/Tools/">Open folder</a>

(bwt the above works on Chrome, it opens D:\Tools in my machine)

What I would like to achieve is opening the folder explorer at the given address (in case of Windows opening Windows Explorer at D:\Tools.

The scenario is: the web application (php) knows which folder to open, the user clicks a button and the folder is opened in folder eplorer. Somehow a manual workaround is:

  1. display the path in the browser
  2. the user copies it
  3. user opens folder explorer
  4. user pastes the path
Community
  • 1
  • 1
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
  • No, you cant interact with the clients OS, that would be a massive security hole. There might be some hack using flash or silverlight, but the install base for those plugins are falling. Why do you want to do this – Steve Sep 10 '14 at 13:14
  • i want to do it because the web app is used as a way to guide the operator. At a certain point he needs to copy one file he created into a specific folder, so the link to open the folder helps him open the correct folder. – UnDiUdin Sep 10 '14 at 13:19
  • 1
    Ok, that does make sense, but the security restrictions exist for a reason. You have a few options. One is to forget it - clear instructions with screengrabs should do. Another option is to write a downloadable wizard program - a downloaded app can have pretty much full control of the system, and could even do the file creation and copying for the user. Another would be to see if flash or silverlight can do what you want, but as i said, less and less people have these extensions installed – Steve Sep 10 '14 at 13:25
  • i realized that the href link i posted above works as expected in IE, while on Chrome it opens in the brower a visualization of the folder. So by using IE i already have the desired behavior, in other more serious browsers the user can copythe folder and paste in folder explorer – UnDiUdin Sep 10 '14 at 14:14
  • i answered my question – UnDiUdin Sep 10 '14 at 14:18

1 Answers1

0

I realized that using Internet Explorer the behavior is my desired one:

1) user clicks on

<a href="file:///\\SERVER\FILES\Folder1">\\SERVER\FILES\Folder1</a>

2) windows explorer opens at \\SERVER\FILES\Folder1

So what i want to achieve it is possible only in Internet Explorer (without exploring plugins and tricks). On other browsers clicking on the link will just let the browser render a read only visualization of the folder, so while using other browsers the user can copy the link text and paste it in the folder explorer.

This solution is not perfect but it suits my need.

UnDiUdin
  • 14,924
  • 39
  • 151
  • 249