By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? File and dirctory counts in a tree...

I made a suggestion yesterday (on a Facebook page) that a function be added to count the number of directories in a directory tree. However, I had forgotten that @Files counts both files and directories, and that even includes the dot and double dot directory entries. So the question is: Is there any known way of getting the number of actual files in a directory tree as well as, separately, the number of directories (excluding the dots and double dots) in a directory tree? (I can write a C++ program if I have to, but I'd really prefer not to have to.)
Just use the attribute selection: -D for files only, D for directories only... and: "If you include the optional /H argument, @FILES will not include the "." and ".." directory entries in the count."

Similar threads