K
KoenT
Hi,
I need a fast way to enumerate files in a directory hierarchy.
I have tried the Directory.GetFiles routine with search option set to
AllDirectories, because it seemed to be useful for this task, but it has some
limitations:
- whenever a subdirectory is encountered that is not accessible for some
reason, the search is abandoned with an exception, and the rest of the
directory structure is not searched anymore (I would like skip these and
continue the search on all other directores that are accessible)
- while not absoutely essential, it would be nice to have a way to get some
feedback, and GetFiles doesn't provide that (having the possibility to supply
some delegate that is called regularly with progress info for example)
So, I would like to hear about other ways to do a search in a directory
structure given some file pattern with woldcards. Could you please advise? Or
point me to some relevant info?
Thank you.
I need a fast way to enumerate files in a directory hierarchy.
I have tried the Directory.GetFiles routine with search option set to
AllDirectories, because it seemed to be useful for this task, but it has some
limitations:
- whenever a subdirectory is encountered that is not accessible for some
reason, the search is abandoned with an exception, and the rest of the
directory structure is not searched anymore (I would like skip these and
continue the search on all other directores that are accessible)
- while not absoutely essential, it would be nice to have a way to get some
feedback, and GetFiles doesn't provide that (having the possibility to supply
some delegate that is called regularly with progress info for example)
So, I would like to hear about other ways to do a search in a directory
structure given some file pattern with woldcards. Could you please advise? Or
point me to some relevant info?
Thank you.