ASP ShortName 属性
定义和用法
ShortName 属性用于指定的文件或文件夹的短名称 (8.3 文件命名约定)。
语法:
FileObject.ShortNameFolderObject.ShortName
针对 File 对象的例子
<%dim fs,fset fs=Server.CreateObject("Scripting.FileSystemObject")set f=fs.GetFile("c:\hitcounterfile.txt"))Response.Write("名称: " & f.Name)Response.Write("<br />短名称: " & f.ShortName)set f=nothingset fs=nothing%>
输出:
名称: hitcounterfile.txt短名称: HITCOU~1.TXT
针对 Folder 对象的例子
<%dim fs,foset fs=Server.CreateObject("Scripting.FileSystemObject")set fo=fs.GetFolder("c:\asp_test_web")Response.Write("名称: " & fo.Name)Response.Write("<br />短名称: " & fo.ShortName)set fo=nothingset fs=nothing%>
输出:
名称: asp_test_web短名称: ASP_TE~1