vbs

关注公众号 jb51net

关闭
首页 > 脚本专栏 > vbs >

VBS教程:属性-DateCreated 属性

作者:

VBS教程:属性-DateCreated 属性

DateCreated 属性

返回指定的文件或文件夹的创建日期和时间。只读。

object.DateCreated

object 应为 File 或 Folder 对象的名称。

说明

以下代码举例说明如何使用 DateCreated 属性:

Function ShowFileInfo(filespec)
  Dim fso, f
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.GetFile(filespec)
  ShowFileInfo = "创建:" & f.DateCreated
End Function
阅读全文