ShortPath Property لـ ASP

التعريف والاستخدام

يستخدم ShortPath Property لتحويل المسار المحدد للملف أو المجلد إلى مسار قصير.(قواعد التسمية بالملفات 8.3).

القواعد النحوية:

FileObject.ShortPath
FolderObject.ShortPath

مثال على File Object

<%
dim fs,f
تعيين fs=Server.CreateObject("Scripting.FileSystemObject")
تعيين f=fs.GetFile("c:\asp_test_web\hitcounterfile.txt")
Response.Write("المسار: " & f.Path)
Response.Write("<br />ShortPath: " & f.ShortPath)
تعيين f=nothing
set fs=nothing
%>

الإخراج:

Path: C:\asp_test_web\hitcounterfile.txt
ShortPath: C:\ASP_TE~1\HITCOU~1.TXT

مثال على Folder Object

<%
dim fs,fo
تعيين fs=Server.CreateObject("Scripting.FileSystemObject")
تعيين fo=fs.GetFolder("c:\asp_test_web")
Response.Write("المسار: " & fo.Path)
Response.Write("<br />ShortPath: " & fo.ShortPath)
set fo=nothing
set fs=nothing
%>

الإخراج:

Path: C:\asp_test_web
ShortPath: C:\ASP_TE~1