Sortere file listing efter DateCreated
HejJeg har følgende kode som lister filer i et directory. Jeg vil godt på nemmest mulig måde have ændret koden til at sortere listen efter oprettelse (DateCreated), sådan så nyeste filer kommer øverst i listen.
-----------kode--------
<html>
<body>
<style TYPE="text/css">
.roundcont {
width: 600px;
background-color: #f90;
color: #fff;
}
.roundcont p {
margin: 0 10px;
}
.roundtop {
background: url(img/tr.gif) no-repeat top right;
}
.roundbottom {
background: url(img/br.gif) no-repeat top right;
}
img.corner {
width: 15px;
height: 15px;
border: none;
display: block !important;
}
</style>
<table border=0 align=center>
<tr>
<td>
<font color="#006699" size=5> test</font>
</td>
</tr>
</table>
<%
Whichfolder=server.mappath("\") &"/"
Dim fs, f, f1, fc
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Whichfolder)
Set fc = f.files
%>
<table border=0 align=center>
<tr>
<td>
<div class="roundcont" >
<div class="roundtop">
<img src="img/tl.gif" alt=""
width="15" height="15" class="corner"
style="display: none" />
</div>
<table align="center">
<%
For Each f1 in fc
%>
<tr>
<td >
  <% Response.Write "" & f1.DateCreated %>
</td>
<td>
  <%Response.write (f1.name & "")%>
</td>
<td width=20%>
<a href="\<%Response.write (f1.name & "")%>" > link</a>
</td>
<td>
</td>
</tr>
<%
Next
%>
</table>
<p></p>
<div class="roundbottom">
<img src="img/bl.gif" alt=""
width="15" height="15" class="corner"
style="display: none" />
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
