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

May 24, 2010
Northlake, Il
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.)
May 20, 2008
Elkridge, MD, USA
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."