John,
You should be able to make a call to FindFirstFileEx, FindNextFile, etc,
etc through the P/Invoke layer. Just set the filter to "*" and you should
be able to get a complete count.
You might also be able to do a select from the WMI provider for the
windows file system, but this could really hit you performance wise.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"jj" <yh*******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi folks:
I can get the list of files in a certain directory by using
Directory.GetFiles("c:\temp").
But I want to get the number of files (ex. 20) within a directory
including
all subdirectories. I don't want to scan through the whole recursively and
count. Is there a way?
Thanks
John