Search code examples
c#visual-studioc#-4.0sharepointsharepoint-2010

how can i open sharepoint library from windows explorer C#


I want to open a sharepoint url (library) in my windows explorer with C #. How can I do it. I tried with System.Diagnostics.Process.Start ("explorer.exe", @ "http: \ ...") but it does not work. Because it opens with web browser. Pleease help me, and my apologise for my English.


Solution

  • SharePoint uses WebDAV to allow Windows to treat document libraries like network shares. This requires the Web Folders feature on all clients, and the WebClient service must be running. If any of these things isn't working, you can't access the document library from Explorer.

    If you can open the library in Windows Explorer, you can treat its path like any other UNC path and write eg: Process.Start(@"\\myServer\...\mylibrary") to open it.

    You can get the UNC path if you open the library in Windows Explorer, right click on it and select Properties.

    Another option is to add the UNC path or URL as a network drive to Windows and access the library by the drive name.