Counting files in a directory

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Any easy/FAST way to count the number of files in a directory?. I can loop
thru using the dir command but it's slow, the directories I'm using contains
1000's of files.

Thanks
 
Is Directory.GetFiles any faster? It returns an array of all the filenames
of course, but you dont have to iterate through them, you can use the Length
property.

Nick Holmes.
 
Back
Top