返回短名稱,這些短名稱由需要以前的 8.3 命名規(guī)范的程序使用。
object.ShortName
object 應為 File 或 Folder 對象。
下面的代碼通過一個 File 對象說明了 ShortName 屬性的用法:
[JScript] function ShowShortName(filespec) { var fso, f, s; fso = new ActiveXObject("Scripting.FileSystemObject"); f = fso.GetFile(filespec); s = "The short name for " + "" + f.Name; s += "" + "<br>"; s += "is:" + "" +f.ShortName
+ ""; return(s); } [VBScript] Function ShowShortName(filespec) Dim fso, f, s Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) s = "The short name for " & UCase(f.Name) & "<BR>" s = s & "is:" &f.ShortName
ShowShortName = s End Function
Attributes 屬性 | DateCreated 屬性 | DateLastAccessed 屬性 | DateLastModified 屬性 | Drive 屬性 | Files 屬性 | IsRootFolder 屬性 | Name 屬性 | ParentFolder 屬性 | Path 屬性 | ShortPath 屬性 | Size 屬性 | SubFolders 屬性 | Type 屬性