Total number of files and directories

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to determine the total number of files and folders in the given
directory.
I have a solution to go recursively on each folder and make a count . But I
do not want to go recursively as it may reduce the performance.

Is there any direct function or property to detmine the numbers.

Atul Sureka
 
AtulSureka said:
I want to determine the total number of files and folders in the given
directory.
I have a solution to go recursively on each folder and make a count . But I
do not want to go recursively as it may reduce the performance.

Is there any direct function or property to detmine the numbers.

No.

-- Barry
 
Hi,

AtulSureka said:
Hi,

I want to determine the total number of files and folders in the given
directory.
I have a solution to go recursively on each folder and make a count . But
I
do not want to go recursively as it may reduce the performance.

Is there any direct function or property to detmine the numbers.

Nop and yes, you could avoid the recursion but you will still would have to
"visit" each directory no matter what. You would just convert the recursion
to an iterative method.
 

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