ImagesIn_User

Gets images in a folder where filenames start with "User"
Similar to function Imagesin, but this one can have a condition to collect these image files.
As usual, pass in the html folder and the seprator of list of file names returned
And it will too get extensions ".JPG" ,"JPEG", ".PNG" or ".GIF"


Public

Tested

My Own Work
Function ImagesIn_User(HTMLFolder, Sepa) ' Only images starts with User*
Rett = ""
StartsWith = "User"
If Sepa = "" Then Sepa = Default_Sepa
Dim FSO, fo,x
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
ServerFolder = Server.MapPath(HTMLFolder)
Set fo = fso.GetFolder(ServerFolder)
For Each x in fo.files
Extt = UCase(Right(x.Name, 4))
If Extt = ".JPG" Or Extt = "JPEG" or Extt = ".PNG" or Extt = ".GIF" Then
If UCase(Left(x.Name, Len(StartsWith))) = UCase(StartsWith) Then
If Rett > "" Then Rett = Rett & Sepa
Rett = Rett & x.Name
End If
End If
Next
Set fo = Nothing
Set FSO = nothing
ImagesIn_User = Rett
End Function

HTMLFolder, Sepa

Views 1195 Downloads 415

Classic ASP File System
ANmarAmdeen
810
Attachments
Revisions

v1.0

Needs
FSO,