VBS教程:属性-ParentFolder 属性

所属分类: 脚本专栏 / vbs 阅读数: 625
收藏 0 赞 0 分享

ParentFolder 属性

返回指定文件或文件夹的父文件夹。只读。

object.ParentFolder

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

说明

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

Function ShowFileAccessInfo(filespec)    Dim fso, f, s    Set fso = CreateObject("Scripting.FileSystemObject")    Set f = fso.GetFile(filespec)    s = UCase(f.Name) & " 的父文件夹为 " & UCase(f.ParentFolder) & "<BR>"    s = s & "创建时间:" & f.DateCreated & "<BR>"    s = s & "上次访问时间:" & f.DateLastAccessed & vbCrLf    s = s & "上次修改时间:" & f.DateLastModified  ShowFileAccessInfo = sEnd Function
更多精彩内容其他人还在看

VBS教程:函数-LCase 函数

VBS教程:函数-LCase 函数
收藏 0 赞 0 分享

VBS教程:函数-LBound 函数

VBS教程:函数-LBound 函数
收藏 0 赞 0 分享

VBS教程:函数-Join 函数

返回一个字符串,此字符串由包含在数组中的许多子字符串联接创建
收藏 0 赞 0 分享

VBS教程:函数-IsObject 函数

VBS教程:函数-IsObject 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNumeric 函数

VBS教程:函数-IsNumeric 函数
收藏 0 赞 0 分享

VBS教程:函数-IsNull 函数

VBS教程:函数-IsNull 函数
收藏 0 赞 0 分享

VBS教程:函数-IsEmpty 函数

VBS教程:函数-IsEmpty 函数
收藏 0 赞 0 分享

VBS教程:函数-IsDate 函数

VBS教程:函数-IsDate 函数
收藏 0 赞 0 分享

VBS教程:函数-IsArray 函数

VBS教程:函数-IsArray 函数
收藏 0 赞 0 分享

VBS教程:函数-Int、Fix 函数

VBS教程:函数-Int、Fix 函数
收藏 0 赞 0 分享
查看更多