您现在的位置是:网站首页> 编程资料编程资料
VBS教程:属性-ShortPath 属性_vbs_
2023-05-25
257人已围观
简介 VBS教程:属性-ShortPath 属性_vbs_
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) & "的短路径名
""s = s & "是:" & f.ShortPathShowShortPath = sEnd Function
