Counting the Number of Folders Not Files.
I can count the number of files in a directory by using
foundfiles.count property, but what would I use to count the number of folders(directories)? |
Counting the Number of Folders Not Files.
or without the reference
MsgBox CreateObject("Scripting.FileSystemObject").GetFold er("C:\Temp").SubFolders.C ount -- HTH Bob Phillips "Chip Pearson" wrote in message ... Ron, Set a reference to the Windows Scripting Runtime library and use code such as the following: Dim FSO As New Scripting.FileSystemObject MsgBox FSO.GetFolder("C:\Temp").SubFolders.Count -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Ron" wrote in message ... I can count the number of files in a directory by using foundfiles.count property, but what would I use to count the number of folders(directories)? |
All times are GMT +1. The time now is 12:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com