VB Script 文件目录操作

(0 comments)

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
Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required