ASP获取文件的最后修改时间
作者:admin 日期:2012-04-10
'获取文件的最后修改时间
Function GetFileLastModifiedTime(FileName)
Dim FSO, File, FilePath, FileTime
IF FileName = "" Then
Response.Write("文件名为空。")
Response.End()
End IF
FilePath = Server.MapPath(FileName)
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
IF FSO.FileExists(FilePath) Then
Set File = FSO.GetFile(FilePath)
FileTime = File.DateLastModified
Set FSO = Nothing
Else
Response.Write("配置文件ServiceArea.xml不存在。")
Response.End()
End IF
GetFileLastModifiedTime = FileTime
End Function
广告位