codice:
Set Cartella = FSO.GetFolder(Server.MapPath(root))
Set Listato = server.createobject("adodb.recordset")
For Each File In Cartella.Files
If File.DateCreated < date then
Ext = Right(File.Name,3)
If Ext = "zip" OR Ext = "exe" OR Ext = "rar" OR Ext = "txt" Then
If UCase(Left(File.Name, Len(Chiave))) = UCase(Chiave) Then
I = I +1
Listato.AddNew
Listato("Id") = I
Listato("Nome") = File.Name
Listato("Dimensione") = File.Size / 1024
Listato("Data") = FormatDateTime(File.DateCreated,2)
End If
End If
End if
Next
Set Cartella = Nothing
If Listato.EOF = False Then
Listato.Sort = "nome"
Listato.MoveFirst
%>
<table cellpadding="3" cellspacing="1" bgcolor="gray" width="600">
<tr>
<th width="5%"></th>
<th width="55%">Nome</th>
<th width="20%">Dimensione</th>
<th width="20%">Data</th>
</tr>
<% For I = 1 To Listato.RecordCount%>
<tr>
<td><%=I%></td>
<td style="text-align:left;">
<a href="window.asp?file=<%=Listato("nome")%>" target="_blank">
<%=Spazio(Listato("Nome"))%></a></td>
<td><%=FormatNumber(Listato("Dimensione"),0)%> Kb</td>
<td><%=Listato("Data")%></td>
</tr>
<%
Listato.MoveNext
Next%>