<完整的文件對象參考
該dateCreated會屬性用於創建一個指定的文件或文件夾時,返回的日期和時間。
句法
FileObject.DateCreated
FolderObject.DateCreated
例如,對於文件對象
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("File created: ")
Response.Write(f.DateCreated)
set f=nothing
set fs=nothing
%>
Output:
File created: 9/19/2001 10:01:19 AM
例如,對於文件夾對象
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("Folder created: ")
Response.Write(fo.DateCreated)
set fo=nothing
set fs=nothing
%>
Output:
Folder created: 9/19/2001 10:01:19 AM
<完整的文件對象參考