Latest web development tutorials

proprietà Path ASP

Unità Object Reference Completa unità oggetto di riferimento

proprietà percorso viene utilizzato per restituire l'unità specificata e il percorso del file o della cartella.

Nota: Per le unità, il percorso non contiene la directory principale.Ad esempio, l'unità percorso C è C: anziché C: \.

grammatica

DriveObject.Path

FileObject.Path

FolderObject.Path

Per esempio oggetto di azionamento

<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
Response.Write("The path is " & d.Path)
set d=nothing
set fs=nothing
%>

输出:

The path is C:

Ad esempio oggetto File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\asp\test\test.asp")
Response.Write("The path is: " & f.Path)
set f=nothing
set fs=nothing
%>

输出:

The path is: c:\asp\test\test.asp

Per oggetto Folder esempio

<%
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


Unità Object Reference Completa unità oggetto di riferimento