FilesIn + FilesIn_Count

Returns list of files found in a folder, list separated with custom separator

Function FilesIn(HTMLFolder, Sepa)
 Rett      = ""
 If Sepa = "" then Sepa = Default_Sepa
 dim fo,x
 ServerFolder   = Server.MapPath(HTMLFolder)
 set fo     = fso.GetFolder(ServerFolder)
 For each x in fo.files
  If Rett > "" then Rett = Rett & Sepa
  Rett      = Rett & x.Name
 Next
 Set fo     = nothing
 FilesIn      = Rett
End Function
Function FilesIn_Count(HTMLFolder)
 Retu       = 0
 ServerFolder   = Server.MapPath(HTMLFolder)
 set fo      = fso.GetFolder(ServerFolder)
 For each x in fo.files
  If x.name > "" then Retu = Retu + 1
 Next
 FilesIn_Count = Retu
End Function

HTMLFolder

Views 632 Downloads 224

'FSO', 'FileSystemObject', 'FSO', 'List', 'files', 'listfiles', 'fileslist'

ANmarAmdeen
326
File System Classic ASP
Revisions

v2.0

Needs