得到所有的UNC共享文件夹的列表的本地网络服务器上 [英] Get a list of all UNC shared folders on a local network server

查看:566
本文介绍了得到所有的UNC共享文件夹的列表的本地网络服务器上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让所有的共享文件夹的可用本地Intranet服务器上的列表。

I'm trying to get a list of all shared folders available on a local intranet server.

System.IO.Directory.GetDirectories()工作正常,如 \\ MYSERVER路径\ myshare的

未处理的异常信息:System.ArgumentException:UNC路径应该是这样的形式\服务器\共享的

Unhandled Exception: System.ArgumentException: The UNC path should be of the form \server\share.

有没有办法让一个列表服务器上的所有共享文件夹?最终,我在寻找一个可以处理基于给定路径上这两种方案的方法 - 返回所有共享的列表给定的服务器和返回所有子目录的列表,对于给定的网络共享文件夹

Is there a way to get a list all shared folders for a server? Ultimately I'm looking for a method that can handle both scenarios based on a given path - returning a list of all shares for a given server and returning a list of all subdirectories for a given network shared folder.

推荐答案

我想这是你在找什么的 HTTP://www.$c$cproject.com/KB/IP/networkshares.aspx

I think this is what you are looking for http://www.codeproject.com/KB/IP/networkshares.aspx

这篇关于得到所有的UNC共享文件夹的列表的本地网络服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆