ASP ShortName 屬性
完整的 Folder 對(duì)象參考手冊(cè)
ShortName 屬性用于返回指定文件或文件夾的短名稱(chēng)(8.3 文件命名公約)。
語(yǔ)法
FileObject.ShortName
FolderObject.ShortName
針對(duì) File 對(duì)象的實(shí)例
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\hitcounterfile.txt"))
Response.Write("Name: " & f.Name)
Response.Write("<br>ShortName: " & f.ShortName)
set f=nothing
set fs=nothing
%>
輸出:
Name: hitcounterfile.txt
ShortName: HITCOU~1.TXT
針對(duì) Folder 對(duì)象的實(shí)例
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp_test_web")
Response.Write("Name: " & fo.Name)
Response.Write("<br>ShortName: " & fo.ShortName)
set fo=nothing
set fs=nothing
%>
輸出:
Name: asp_test_web
ShortName: ASP_TE~1
完整的 Folder 對(duì)象參考手冊(cè)
更多建議: