The code implemented in ASP to return the number of files in a specified folder is copied as follows:
'Return the number of files in the specified folder, the input value is the absolute path of the hard disk of the detected folder
function CountFilesNumber(folderspec)
Dim objfso,f,fc
Set objfso=CreateObject(Scripting.FileSystemObject)
Set f=objfso.GetFolder(folderspec)
Set fc=f.Files
CountFilesNumber=fc.Count
set fc=nothing
set f=nothing
set objfso=nothing
End Function