Sortering af filer efter dato
Jeg skal have lavet nedenstående om, så filerne sorteres efter dato i stedet for efter titel. Nogen ideer?Function ShowFolderList()
folderspec = Server.MapPath("/download/files/records/"&request.querystring("id")&"/")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(folderspec) Then
Set folder = fso.GetFolder(folderspec)
Set foldercollection = folder.Files
If foldercollection.count > 0 Then
For Each file in foldercollection
tmp = tmp & "<a href='/download/files/records/"& request.querystring("id")& "/" & file.name & "' target='_blank'>" & file.name & " ("& (file.size/1000) & " kb)"
tmp = tmp & " - uploaded: " & FormatDateTime(file.DateLastModified,vbShortDate) & "</a><br>"
Next
ShowFolderList = tmp
else
showfolderlist = "<h4>No files uploaded.</h4>"
end if
else
showfolderlist = "<h4>No files uploaded.</h4>"
end if
End Function
response.write showfolderlist()