p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: number of files in folder

Message #1 by "timothy R magesh" <magesh_52176@r...> on 30 Mar 2002 05:04:59 -0000
Hi there,

You can use the Count property of the files collection of a folder object 
to get the number of files.

Here is a small example:

Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objFolder
Set objFolder = objFSO.GetFolder("C:\MyTestFolder")
Response.Write("Folder has " & objFolder.Files.Count & " files")

For more info, check out the FSO documentatiion at: (watch for wrapping)



> sir,

How to find out total number of  files

in the folder.For finding the name of

the file we use the fileproperty

file.name.Likewise is there any built

in function or any code to find out

total number of  files in a particular


  Return to Index