|
|
 |
Counting files in folder
russellcurti | Posted 2:09am 13. October 2002 Server Time |
It is possible to count the number of files in a subdirectory and return that figure as a variable?
|
bellasgirl | Posted 11:27am 14. October 2002 Server Time |
you can use the FileSystemObject to do that.
------ dim fso, folder, subfolders, files
set fso = Server.CreateObject("Scripting.FileSystemObject") Set Folder = fso.GetFolder(Server.MapPath("/")) Set subFolders = Folder.SubFolders Set files = subFolders.Files
ctr = 0 For each file in files set ctr = ctr + 1 next
---- I don't know of an easier way to do it, but I hope this helps.
Show all replies to 'Counting files in folder'
|
This post have been closed for new replies
|
|
|
|
 |
|