Copy Code code as follows:
Set Fso=createobject ("Scripting.FileSystemObject")
Set FN=FSO. GetFile ("E:\AD.txt")
MsgBox "File creation time:" &FN. DateCreated
MsgBox "File Last modified:" &FN. DateLastModified
MsgBox "File Last access time:" &FN. Datelastaccessed
Set fn=nothing
Set fso=nothing
Introduction to FileSystemObject objects:
The FileSystemObject object is used to access the file system on the server. This object can operate on files, folders, and directory paths. You can also obtain information about the file system from this object.
The following code creates a text file (C:\test.txt) and then writes some text to the file:
Copy Code code as follows:
<%
Dim fs,fname
Set Fs=server.createobject ("Scripting.FileSystemObject")
Set FNAME=FS. CreateTextFile ("C:\test.txt", True)
FName. WriteLine ("Hello world!")
FName. Close
Set fname=nothing
Set fs=nothing
%>
For more information, please refer to FileSystemObject official documentation: HTTP://MSDN.MICROSOFT.COM/ZH-CN/LIBRARY/AA711216