ASP ชื่อย่อพ ร็อพเพอร์ ตี้
❮ อ้างอิงวัตถุโฟลเดอร์ที่สมบูรณ์
คุณสมบัติ ShortName ใช้เพื่อส่งคืนชื่อย่อของไฟล์หรือโฟลเดอร์ที่ระบุ (แบบแผนการตั้งชื่อ 8.3)
ไวยากรณ์
FileObject.ShortName
FolderObject.ShortName
ตัวอย่างสำหรับวัตถุไฟล์
<%
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
%>
Output:
Name: hitcounterfile.txt
ShortName: HITCOU~1.TXT
ตัวอย่างสำหรับวัตถุโฟลเดอร์
<%
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
%>
Output:
Name: asp_test_web
ShortName: ASP_TE~1
❮ อ้างอิงวัตถุโฟลเดอร์ที่สมบูรณ์