This article describes how to obtain the file creation time, last modification time, and last access time using vbscript. This article is implemented using the FileSystemObject object. For more information, see
Set fso = createobject ("Scripting. fileSystemObject ") set fn = fso. getFile ("E: \ AD.txt") msgbox "File Creation Time:" & fn. dateCreatedmsgbox "Last file modification time:" & fn. dateLastModifiedmsgbox "Last file access time:" & fn. dateLastAccessedset fn = nothingset fso = nothing
Introduction to FileSystemObject objects:
The FileSystemObject object is used to access the file system on the server. This object can be used to operate files, folders, and directory paths. You can also use this object to about the file system.
The following code creates a text file (c: \ test.txt) and then writes some text to the file:
<% Dim fs, fname set fs = Server. createObject ("Scripting. fileSystemObject ") set fname = fs. createTextFile ("c: \ test.txt", true) fname. writeLine ("Hello World! ") Fname. Closeset fname = nothingset fs = nothing %>
For more information about how to obtain the file creation time, last modification time, and last access time using vbscript, see PHP!