FilesCount_Swift

Count how many files in a folder, with no loop, faster if you just need all types of files in that folder.
For more advanced version check FilesIn_Count

Public
Tested
My Own Work
Function FilesCount_Swift(HTMLFolder)
 ' Set fs       = CreateObject("Scripting.FileSystemObject")
 fileCount    = 0
 myDir      = Server.MapPath(HTMLFolder) ' "C:\DATA\Sourcefiles\Department2\"
 set folder    = fs.GetFolder(myDir)
 set files    = folder.Files
 FilesCount_Swift  = files.count
End Function

HTMLFolder (Unmapped location as in "/images/")

Views 1465 Downloads 553

Classic ASP File System
ANmarAmdeen
627
Revisions

v1.0

Needs