Ich würde das eher so machen ... ist ungetestet
Function LatestDateLastModified(byref folder)
dim date
date = DateSerial(0,0,0)
dim files
set files = folder.Files
for each file in files
if date < file.datelastmodified then
date = file.datelastmodified
end if
next
set files = nothing
dim subFolders
set subFolders = folder.SubFolders
Dim subFolder
for each subFolder in subFolders
Dim subFolderDate
subFolderDate = LatestDateLastModified(subFolder)
if date < subFolderDate then
date =
end if
next
set subFolders = nothing
LatestDateLastModified = date
End Function
Dim fso
set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim rootFolder
set rootFolder = fso.GetFolder(Server.MapPath("/apache/htdocs/common/"))
Dim date
date = "1/1/2001"
date = formatdatetime( LatestDateLastModified(rootFolder), 2)
Response.Write "Last Update: " & day(date) & "-" & monthname(month(date), false) & "-" & year(date) & "<br>"
set fso = nothing
set rootFolder = nothing