/ Published in: ASP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<% function getListOfFiles(path) dim fs, folder, list(), ub set fs = CreateObject("Scripting.FileSystemObject") set folder = fs.GetFolder(path) ub = -1 for each file in folder.Files ub = ub+1 redim preserve list(ub) list(ub) = file.Name next getListOfFiles = list end function dim files : files = getListOfFiles(server.MapPath("/images")) for each name in files response.Write(name&"<br>") next %>