خصائص ShortPath في ASP
التعريف والاستخدام
يستخدم خاصية ShortPath لتحويل المسار المحدد للملف أو المجلد إلى مسار قصير (اتفاقية التسمية 8.3).
النحو:
FileObject.ShortPath FolderObject.ShortPath
مثال
مثال على File Object
<% تعيين 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
<% تعيين 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