<% Dim objFSO , objFolder , file Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath("images/")) For Each file in objFolder.SubFolders %> <%= file.name %>
<% Next %> <% For Each file in objFolder.Files %> <%= file.name %>
<% Next Set objFolder = Nothing Set objFSO = Nothing %>