Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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)?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default 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)?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.TMP files are corrupting my folders Ed Excel Discussion (Misc queries) 2 February 8th 08 02:08 PM
Opening Files/Folders animalfriend7 Excel Discussion (Misc queries) 2 June 23rd 05 11:57 PM
Drive - Folders - Files DPC Excel Discussion (Misc queries) 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 12:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"