listDir.asp by Chris Garrett
1 <%
2
3 Function listDir(listdir)
4
5 dim fso, f, dir, tempFile
6
7 dir=server.MapPath(listdir)
8
9 Set fso = CreateObject("Scripting.FileSystemObject")
10 Set f = fso.GetFolder(dir)
11
12 for each tempFile in f.Files
13
14 if instr(tempFile.name,".gif") or instr(tempFile.name,".jpg") then
15 Response.Write("<a href=""" & listDir & tempFile.name & """><img src=""image3.aspx?src=" & listDir & tempFile.name & """ border=0></a> ")
16 end if
17
18 next
19
20
21 Set fs = Nothing
22
23 End Function
24
25 %>
26
27