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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top