0514-86177077
9:00-17:00(工作日)
返回按照早期 8.3 文件命名約定轉(zhuǎn)換的短文件名。
object.ShortName
object 應(yīng)為 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
標簽:通遼 資陽 咸寧 滄州 阿里 韶關(guān) 昌都 海北
上一篇:VBS教程:屬性-ShortPath 屬性
下一篇:VBS教程:屬性-ShareName 屬性
Copyright ? 1999-2012 誠信 合法 規(guī)范的巨人網(wǎng)絡(luò)通訊始建于2005年
蘇ICP備15040257號-8