how to get hidden folder from string array [duplicate]
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();
精彩评论