Jump to content

Recommended Posts

Posted

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!

Posted
net use x: https://mycompany.sharepoint.com/data
start explorer.exe /e,x:

 

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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
×
×
  • Create New...