foreach (string dir in Directory.GetDirectories(@"c:\"))
{
DirectoryInfo di = new DirectoryInfo(dir);
if ((di.Attributes & FileAttributes.System) == 0)
dirList.Add(dir);
}
DirectoryInfo.Attributes is a Flag enum list so you can't just check for equality. Using the above code makes it more or less safe :-)
The life of a computer/sci-fy/teccie-nerd :-) Interested in lots of stuff like: Net, C#, Software Architecture, IoT, building stuff (like sensors based on RPI Pico W), Cars, Books, meeting people, learning new stuff, Cyber Security
Subscribe to:
Post Comments (Atom)
Lazzes Smart Home - 2023
Here is an overview of the components in the Smart Home as of now. More stuff than I tought :-)
-
If you, like me - use VLC mediaplayer to view all your media, you may have run into the same problem as I. That is, when we watch multiple m...
-
1) Define constants const int WM_KEYDOWN = 0x100; const int WM_KEYUP = 0x101; 2) Add interface, IMessageFilter public partial class Form1 : ...
-
The DivX register app is hardcoded to use the System32 folder as path for Rundll32, which of course doesn't exist on a 64bit system. So ...
No comments:
Post a Comment