返回按照早期 8.3 文件命名约定转换的短文件名 。
object.ShortName
object 应为 File 或 Folder 对象的名称 。
以下代码举例说明如何使用 ShortName 属性:
Function ShowShortName(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = UCase(f.Name) & "<BR>"的短文件名" s = s & "是:" & f.ShortName ShowShortName = s End Function
Function ShowShortName(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = UCase(f.Name) & "<BR>"
"
s = s & "
" & f.ShortName
ShowShortName = s
End Function