I have this loop:
foreach (DirectoryInfo dir in downloadedMessageInfo.GetDirectories())
{
if (dir.Attributes != FileAttributes.Hidden)
{
dir.Delete(true);
}
}
How can I correctly skip all hidden directories?