Read all files in folder and display





-3
Date Submitted Tue. Feb. 28th, 2006 3:09 AM
Revision 1 of 1
Syntax Master dannyboy
Tags "ASP" | "PICTURES" | "VBSCRIPT"
Comments 0 comments
Read all files in specified folder and display them in page
On Error Resume Next
Set fs = Server.CreateObject("Scripting.FileSystemObject")
        fName = Request.ServerVariables("APPL_PHYSICAL_PATH") & "/FOLDER_LOCATION/"
        Set folder = fs.GetFolder(fname)
        For each item in folder.Files
                Response.Write "<img src='/FOLDER_LOCATION/" & item.Name & "' height='20%' border='0'>"
        Next

Comments

There are currently no comments for this snippet.

Voting