Browse all shared folders on a specified network server

2 posts, 0 answers
  1. Michael
    Michael avatar
    4 posts
    Member since:
    Jun 2010

    Posted 24 Aug 2010 Link to this post


    I'm using Telerik FileExplorer control with a custom provider from this KB article that allows to browse a shared folder in my local network.

    It works fine when I specify a shared folder path like "\\myServer\mySharedFolder", however it does not work with a network path that has just a server name in it (e.g. "\\myServer").

    I would like to be able to provide a server name and see the list of all shared folders on such server and then browse these folders.
    Is it possible to do?

  2. Michael
    Michael avatar
    4 posts
    Member since:
    Jun 2010

    Posted 26 Aug 2010 Link to this post

    OK, I think I've solved this.

    I've created my own GetDirectories method that can handle both "//server/share" and "//server" paths. It uses regular expressions to figure out what kind of path is given and then either calls standard System.IO.Directory.GetDirectories() method for //server/share like paths or uses the code from this CodeProject article to enumerate shared folders on the server.

    Then I've changed all the calls to System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() methods in the CustomProvider code and everything started to work fine for me. 

    I have to mention, that we only intend to use FileExplorer to browse files on remote server, not sure how well my solution will work for folders moving/deleting scenarios.

  3. DevCraft R3 2016 release webinar banner
Back to Top