Mwongozo wa ShortPath wa ASP

Mifano na Matumizi

Mwongozo wa ShortPath ya Kifaa kinachohusisha kujifunza namba ya muhtasari ya faili au folda (Muundo wa Namba ya Faili 8.3).

Muundo wa Kiini

Kikapteni cha Fayili.Namba ya Muhtasari
Kikapteni cha Folda.Namba ya Muhtasari

Mfano wa Kikapteni cha Fayili

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\asp_test_web\hitcounterfile.txt")
Response.Write("Namba ya Muhtasari: " & f.Path)
Response.Write("<br />ShortPath: " & f.ShortPath)
set f=nothing
set fs=nothing
%>

Muheruko:

Namba ya Muhtasari: C:\asp_test_web\hitcounterfile.txt
Namba ya Muhtasari: C:\ASP_TE~1\HITCOU~1.TXT

Mfano wa Kikapteni cha Folda

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp_test_web")
Response.Write("Namba ya Muhtasari: " & fo.Path)
Response.Write("<br />ShortPath: " & fo.ShortPath)
set fo=nothing
set fs=nothing
%>

Muheruko:

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