Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the number of files in a Files object
Syntax
object.Count
Remarks
The following example illustrates the use of the Count property.
function ShowFolderFileList(folderspec)
{
var fso, f, f1, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
//get the folder by giving its path
f = fso.GetFolder(folderspec);
fc = f.files;
s = fc.Count;
return(s);
}
Function ShowFolderList(folderspec, filespec)
Dim fso, f, f1, fc, s
Set fso = CreateObject("Scripting.FileSystemObject")
'get the folder by giving its path
Set f = fso.GetFolder(folderspec)
Set fc = f.Files
Set s = fc.Count
ShowFolderList = s
End Function