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

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 194 Downloads 82

'FSO', 'files', 'folder', 'count', 'swift', 'frequency', 'types', 'all', 'fso'

ANmarAmdeen
443
File System Classic ASP
Revisions

v1.0

Needs