View Single Post
  #4 (permalink)  
Old April 14th, 2006, 02:17 AM
Raghunathan Raghunathan is offline
Authorized User
 
Join Date: Mar 2006
Location: Chennai, Tamil Nadu, India.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Raghunathan
Default

hi,

i hope this code will surely help your needs, pls gimme your feedback.

Dim ObjFSO
Dim ObjFolder
Dim ObjFile

Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
Set ObjFolder = ObjFSO.GetFolder("C:\MyFolder") 'folder path

For Each ObjFile In ObjFolder.Files
    If InStr(1, ObjFile.Name, "library", vbTextCompare) > 0 And _
              LCase(ObjFSO.GetExtensionName(ObjFile.Path)) = "jpg" Then
        Response.Write ObjFile.Path & "<BR>"
    End If
Next

Regards,
Raghu