ShortPath 属性

返回短路径名,这些短文件名由需要以前的 8.3 文件命名规范的程序使用。

object.ShortPath

object 应为 FileFolder 对象。

说明

下面的代码通过一个 File 对象说明了 ShortName 属性的用法:

function ShowShortPath(filespec)
{
   var fso, f, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFile(filespec);
   s = "The short path for " + "" + f.Name;
   s += "" + "<br>";
   s += "is: " + "" + f.ShortPath + "";
   return(s);
}

请参阅

Attributes 属性 | DateCreated 属性 | DateLastAccessed 属性 | DateLastModified 属性 | Drive 属性 | Files 属性 | IsRootFolder 属性 | Name 属性 | ParentFolder 属性 | Path 属性 | ShortName 属性 | Size 属性 | SubFolders 属性 | Type 属性
应用于: File 对象 | Folder 对象