ASP修改文件时间
<%
Sub ModifyLastAccessedDate(emlFilePath, newDate)
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set file = objFSO.GetFile(emlFilePath)
    Set app = Server.CreateObject("Shell.Application") 
    Set folder = app.NameSpace(file.ParentFolder & "\") 
    Set fileModify = folder.ParseName(file.Name) 

    fileModify.ModifyDate = NewDate 

    Set objFSO = Nothing
    Set file = Nothing 
    Set folder = Nothing 
    Set app = Nothing 
    Set fileModify = Nothing
End Sub

Call ModifyLastAccessedDate("F:\www\file1.txt","2016-12-02 6:29:37")
%>
上一篇
下一篇