脚本专栏 
首页 > 脚本专栏 > 浏览文章

VBS教程:属性-ShortPath 属性

(编辑:jimmy 日期: 2024/5/20 浏览:3 次 )

ShortPath 属性

返回按照 8.3 命名约定转换的短路径名。

object.ShortPath

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

说明

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

Function ShowShortPath(filespec)    Dim fso, f, s    Set fso = CreateObject("Scripting.FileSystemObject")    Set f = fso.GetFile(filespec)    s = UCase(f.Name) & "<BR>"的短路径名"    s = s & "是:" & f.ShortPath ShowShortPath = s End Function
上一篇:VBS教程:属性-Key 属性
下一篇:VBS教程:属性-Line 属性
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网