0514-86177077
9:00-17:00(工作日)
返回按照 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
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教程:屬性-Size 屬性
下一篇:VBS教程:屬性-ShortName 屬性
Copyright ? 1999-2012 誠信 合法 規范的巨人網絡通訊始建于2005年
蘇ICP備15040257號-8