Search code examples
javascriptjquerywindows-explorer

Open Sharepoint https URL in windows file explorer


I am trying to open my sharepoint folder structure in windows explorer as it want to access sharepoint folder from office desktop (using office addin).

Some thing like

window.open('file:///https://servername.sharepoint.com/teams/') 

but this doesnot work. It gives Access is denied error.

I tried with below things. First I tried

window.open('file://servername.sharepoint.com/teams/')- 

It opened link in file explorer but as http request. which is causing authentication issue after getting file. Then I tried:

window.open('file:///https%3A%2F%servername.sharepoint.com/)- 

I tried using escape sequence and many more combinations, bt nothing seems to be working

I want to open sharepoint folder structure in windows explorer, but for that document to open without error the link in windows explorer should be https

windows explorer with sharepoint URL

why windows explorer - to give office add-in integrated look, i do not want to open sharepoint link in browser. so i tried open dialog box, but in open dialog box we cannot set location path. So at last we decided to go with windows explorer


Solution

  • Yes, you can open SharePoint folder URL path in file explorer as follows

    for http url (http://my-domain.sharepoint.com/teams/xxxxxxxx/xxxxxxx/)

     window.open('file://my-domain.sharepoint.com/teams/xxxxxxxx/xxxxxxx/', '_blank'); 
    

    for https url(https://my-domain.sharepoint.com/teams/xxxxxxxx/xxxxxxx/)

    window.open('file://my-domain.sharepoint.com@SSL/teams/xxxxxxxx/xxxxxxx/', '_blank');