Jump to content

How to open WebDav URL in Windows Explorer?


Recommended Posts

Hi All,

Trying to open windows explorer to a WebDav location and it's not working quite how I want, on the computers it is setup as a "network location" (as opposed to a "mapped drive", and this unfortunately can't be changed), the "Data" WebDav folder sits directly under "This PC" if that's an easier way to get to it. any suggestions as to what I can correct to get the 2nd example to work?

; This works, but I'm trying to avoid this as users normally see the URL style in the 2nd example below
$folderToOpen = "\\mycompany.sharepoint.com@SSL\DavWWWRoot\Data"
Run("Explorer.exe " & $folderToOpen)

; This does not work, it tries to open the WebDav url in the default web browser
$folderToOpen = "https://mycompany.sharepoint.com/Data"
Run("Explorer.exe " & $folderToOpen)

ShellExecute also opens it in the default browser.
Saw _WinAPI_ShellOpenFolderAndSelectItems but couldn't get the 2nd example to work.

If I manually open Windows Explorer and paste in https://mycompany.sharepoint.com/Data it loads the WebDav directory without issue.

If I have to use the pathing from the first example it is fine, just trying to give users a familiar experience.

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...