ASP Path లక్షణం
నిర్వచనం మరియు వినియోగం
Path లక్షణం కొన్ని డ్రైవ్, ఫైల్ లేదా ఫోల్డర్ కొరకు మార్గాన్ని తిరిగి ఇస్తుంది.
విధానం:
DriveObject.Path FileObject.Path FolderObject.Path
డ్రైవ్ ఆబ్జెక్ట్ కొరకు ఉదాహరణ
<% dim fs,d set fs=Server.CreateObject("Scripting.FileSystemObject") set d=fs.GetDrive("e:") Response.Write("The path is " & d.Path) set d=nothing set fs=nothing %>
输出:
మార్గం ఉంది E:
ఫైల్ ఆబ్జెక్ట్ కొరకు ఉదాహరణ
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\asp\test.asp") Response.Write("The path is: " & f.Path) set f=nothing set fs=nothing %>
输出:
మార్గం ఉంది: C:\asp\test.asp
ఫోల్డర్ ఆబ్జెక్ట్ కొరకు ఉదాహరణ
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\asp\test") Response.Write("The path is: " & fo.Path) set fo=nothing set fs=nothing %>
输出:
The path is: C:\asp\test