You don't have to loop through.  You can just get the count of the files
collection.  Note that this will not include files in subdirectories.
You'd have to add some recursion to the function for that, I'd imagine.

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDir = oFSO.GetFolder("C:\Path")
Response.Write oDir.Files.Count
Set oDir = Nothing
Set oFSO = Nothing

Ray at work


> -----Original Message-----
> From: GLSmyth [mailto:[EMAIL PROTECTED] 
> 
> 
> 
> 
> 
> Is there any way to use the folder object to determine how many files
> are in the folder, or should I just loop through them to get 
> the count?
> 
> Thanks -
> 
> george




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to