开发者

how to get hidden folder from string array [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

How to select only hidden folder from String[]?

folderBrowserDialog1.Reset();
folderBrowserDialog1.ShowDialog();
if (folderBrowserDialog1.SelectedPath != "")
{
  sourcetx开发者_如何学Ct.Text = folderBrowserDialog1.SelectedPath;
  string[] path = Directory.GetDirectories(folderBrowserDialog1.SelectedPath);
}

i am write this code.i have get all folder with hidden folder of this array name of path .But i trying to get only hidden folder of this array (array name path).please please solve this problem any one.

Thankig You.



...
string[] path = new DirectoryInfo(folderBrowserDialog1.SelectedPath)
   .EnumerateDirectories()
   .Where(x=>x.Attributes & FileAttributes.Hidden)
   .Select(x=>x.Name).ToArray();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜