Un piccolo esempio che potrai facilmente personalizzare:
codice:
<%
' definizione del recordset
set custRs = Server.CreateObject("ADODB.Recordset")
custRs.Fields.Append "nome", 200, 300 ' adVarChar
custRs.Fields.Append "dimensione", 2, 4 ' smallint
custRs.Fields.Append "data", 7 ' Date
custRs.Open
' popolamento
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
StrPath = Server.MapPath("/")
Set f = FileObject.GetFolder(strPath)
Set fc = f.SubFolders
For Each f1 in fc
custRs.AddNew
custRs("nome") = f1.name
custRs("data") = f1.DateCreated
custRs("dimensione") = f1.size / 1024
Next
Set fc = Nothing
Set f = Nothing
Set FileObject = Nothing
' Ordino in base al campo data
custRs.Sort = "data DESC"
Response.write ("<table border=1>")
Response.write ("<tr><th>Nome<th>Dimensione<th>Data di creazione")
' Mostro il recordset appena ordinato
Do until custRs.eof
Response.Write ("<tr><td>" & custRs("nome") )
Response.Write ("<td>" & custRs("dimensione") & " KB" )
Response.Write ("<td>" & custRs("data") )
custRs.movenext
loop
Response.write ("</table>")
' libero risorse
custRs.Close
set custRs = Nothing
%>