Wayne,
In this case, you would want to call FindFirstFileEx through the
P/Invoke layer. It will return a handle which represents the search. Then,
you would process your files one after another in a loop, calling
FindNextFile to get the next file information.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"ThisBytes5" <Th********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Is there a built in way in .net to retrieve all the files in a
directory one at a time? I have to process a bunch of files serially
and there can be more than 100K files in the dir. I am trying to avoid
FileInfo[] or System.IO.Directory.GetCurrentDirectory() as I don't
want all the info loaded into memory at once.
Previously I would just use FindFirst and Findnext
Thanks
Wayne