Path 属性
返回指定文件、文件夹或驱动器的路径。
object.Path
object 应为 File、Folder 或 Drive 对象的名称。
说明
对于驱动器,路径不包含根目录。例如,C 驱动器的路径是 C:,而不是 C:\。
以下代码举例说明如何使用 Path 属性:
Function ShowFileAccessInfo(filespec)
Dim fso, d, f, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(filespec)
s = UCase(f.Path) & "<BR>"
s = s & "创建时间:" & f.DateCreated & "<BR>"
s = s & "上次访问时间:" & f.DateLastAccessed & "<BR>"
s = s & "上次修改时间:" & f.DateLastModified
ShowFileAccessInfo = s
End Function
Path 属性
原创文章如转载,请注明:转载自悠悠博客 [ http://www.ajaxstu.com/ ]
相关文章:
- Drive 属性(2007-10-25 7:12:0)
- DriveType 属性(2007-10-24 10:48:23)
- DateLastAccessed 属性(2007-9-3 8:39:21)
- Line 属性(2007-2-9 1:43:32)
- AvailableSpace 属性(2007-1-2 2:4:53)
- vbscript:File 对象(2006-11-3 5:45:50)
- vbscript:FileSystemObject 对象(2006-10-19 7:35:29)
- DateCreated 属性(2006-9-25 7:32:19)
- FreeSpace 属性(2006-9-17 3:48:5)
- vbscript:Folders 集合(2006-9-13 5:28:51)
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
