C# - Get list of shared folders on another computer

Discussion in 'Programming & Software Development' started by nexx, Jul 22, 2008.

  1. nexx

    nexx Member

    Joined:
    Sep 23, 2002
    Messages:
    6,363
    Location:
    Brisbane
    I'm playing around with Visual C# Express, trying to get a list of Windows folder shares on another computer.

    eg: User puts in the name of the server "Dave", and then my program lists all the folders that computer has shared in a listbox or something. Same results as if you were to go into explorer and put "\\Dave" in the address bar.

    But i cant find any way of doing it! Other than some seemingly complicated methods using WMI and requiring admin access...surely there is an easier way!

    Thanks :)

    tl;dr - I want a user to put in "\\Computer" and have my program output the folders that computer is sharing: "\\Computer\\Share1", "\\Computer\Music", "\\Computer\Movies" etc
     
    Last edited: Jul 22, 2008
  2. Bradzac

    Bradzac Member

    Joined:
    Aug 17, 2003
    Messages:
    1,744

Share This Page

Advertisement: