Jamie,
This could be a huge task. Are you looking for all of the network
shares exposed on one machine, or in the whole network?
If you know the machine you want to look for the shares on, then I
would use the classes in the System.Management namespace to query for
all instances of Win32_Share where the Type is 0. You can use pass a
ManagementPath instance (with the server specified) to the constructor
of the ManagementClass object to indicate that you want the query
performed on that machine.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
But how do i find the network share drives to start with?
The example i've been looking at imports a dll,
[DllImport("mpr.dll")]
public static extern int WNetOpenEnum(ResourceScope dwScope,
ResourceType dwType, ResourceUsage dwUsage, NETRESOURCE lpNetResource,
out IntPtr lphEnum);
like but i cant find any examples in straight c#
"Nicholas Paldino [.NET/C# MVP]" <
[email protected]>
wrote in message Jamie C,
Why not just use the static Copy method on the File class?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Hi
How can i look for network share folders and copy a text file to it?
I've been looking into how i can do this in the documention but with
no luck. I found a little on of the web but i dont understand it, it
seems to import mpr.dll and make the use of c++ calls. Can this be
just done by c#?
If so how?
Jamie C