VB Scripts文件目录操作


版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明
http://www.liaojl.com/archives/2009/07/vb-scripts-file.html

VB Scrtips中对文件和目录的操作通过CreateObject

查看文件创建、访问和修改日期

Function ShowFileAccessInfo(filespec)
  Dim fso, f, s
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.GetFile(filespec)
  s = UCase(filespec) & "<BR>"
  s = s & "创建:" & f.DateCreated & "<BR>"
  s = s & "最后一次访问:" & f.DateLastAccessed & "<BR>"
  s = s & "最后一次修改:" & f.DateLastModified  
  ShowFileAccessInfo = s
End Function

发表评论

归档

友情链接

Creative Commons License
此Blog中的日记遵循Creative Commons(知识共享)授权

联系方式