What's new

.NET programming question - accessing network shares (1 Viewer)

Chad Ellinger

Second Unit
Joined
Jun 18, 2000
Messages
269
I want to write up a little LAN application for myself, and I have come across a seemingly simple function that I can't figure out.

I want to pull a list of all the available file shares on my LAN. I want to write this app in C# if possible (Java is ok too), and I've looked into the System.Management classes, but I still can't find what I'm looking for.

Are the any .NET gurus out there that can help me out?
 

Max Leung

Senior HTF Member
Joined
Sep 6, 2000
Messages
4,611
You can get a list of logical drives using the Directory.GetLogicalDrives method found in the System.IO namespace, although that's probably not what you want unless you can guarantee that all your LAN shares are assigned to a drive letter.

I guess you'll have to browse the System.IO.Directory and System.IO.DirectoryInfo documentation. Failing that, look at all of System.IO!

Also try searching Google Groups...
 

Chad Ellinger

Second Unit
Joined
Jun 18, 2000
Messages
269
Thanks Max. I did search through Google Groups, and found some info on the WMI (Windows Management Interface) SDK. I *believe* that System.Management is the .NET implementation of WMI, but I have yet to find any good examples of what I want to do using it.
 

Users who are viewing this thread

Sign up for our newsletter

and receive essential news, curated deals, and much more







You will only receive emails from us. We will never sell or distribute your email address to third party companies at any time.

Forum statistics

Threads
356,998
Messages
5,128,035
Members
144,227
Latest member
maanw2357
Recent bookmarks
0
Top