sarthemaker
Active member
- Joined
- Sep 4, 2009
- Messages
- 36
- Programming Experience
- 5-10
I am trying to get the files in a directory and display them in a list box. I have that part working, but I would only like to show the files that are NOT hidden. I am currently using this:
this is part of a for each loop.
But is there a way to only return the files that are not hidden, instead of having to check if they are?
I also need this to see how many files are in each directory so I don't have to count each file in each directory within the current folder. If I use the CheckDirectory.GetFiles().count, it counts the hidden files to.. A for each loop is just too slow..
does any one know of a way that I can accomplish this?
VB.NET:
Dim atts As FileAttribute = CheckDirectory.Attributes
If (atts And FileAttribute.Hidden) = FileAttribute.Hidden Then...
this is part of a for each loop.
But is there a way to only return the files that are not hidden, instead of having to check if they are?
I also need this to see how many files are in each directory so I don't have to count each file in each directory within the current folder. If I use the CheckDirectory.GetFiles().count, it counts the hidden files to.. A for each loop is just too slow..
does any one know of a way that I can accomplish this?