By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,481 Members | 3,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,481 IT Pros & Developers. It's quick & easy.

Browse for a network folder

P: n/a
Im trying to write an application which goes through selected servers on the
network and (according to the file path provided) recurses through all
folders and deletes log files that fit a specified criteria.

This is working when passing UNC names between the methods, but the users
need to know the UNC path if the server isnt in the list currently held by
the app.

What the users need is the equivalent of the FolderBrowserDialog that will
accept a UNC path as the root directory. Is this possible? if so how can it
be done?

Cheers
--
David Thorn
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I know that you can get information about the local LAN and the computers
connected it using the WIN32 API's
WNetEnumResource or NetServerEnum. These are unmanaged API and you will have
to use interop to access these methods, Note if NetBios is not availalble on
your network, then these APIs will not work.

WIN32 API WNetEnumResource
http://msdn.microsoft.com/library/de...umresource.asp

WIN32 API NetServerEnum
http://msdn.microsoft.com/library/de...serverenum.asp
For information about using these API's from .Net (C#) check out the
following:

WNetEnumResource
http://www.pinvoke.net/default.aspx/...esource?diff=y

NetServerEnum
http://pinvoke.net/default.aspx/netapi32.netserverenum

An interesting article on networking in .Net:
http://discuss.fogcreek.com/dotnetqu...ow&ixPost=6605
For an example in Vb.Net of using he above API's check out
http://vbnet.mvps.org/index.html?cod...umresource.htm
And finally for a Vb.Net to C# converter check out:
http://www.developerfusion.co.uk/uti...btocsharp.aspx

HTH

Ollie Riches

"Dave Thorn" <Da*******@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
Im trying to write an application which goes through selected servers on
the
network and (according to the file path provided) recurses through all
folders and deletes log files that fit a specified criteria.

This is working when passing UNC names between the methods, but the users
need to know the UNC path if the server isnt in the list currently held by
the app.

What the users need is the equivalent of the FolderBrowserDialog that will
accept a UNC path as the root directory. Is this possible? if so how can
it
be done?

Cheers
--
David Thorn

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.