69pao国产精品视频-久久精品一区二区二三区-精品国产精品亚洲一本大道-99国产综合一区久久

ASP Path 屬性

asp path 屬性

file 對(duì)象參考手冊(cè) 完整的 file 對(duì)象參考手冊(cè)

path 屬性用于為指定的驅(qū)動(dòng)器、文件或文件夾返回路徑。

語法

driveobject.path

fileobject.path

folderobject.path

針對(duì) drive 對(duì)象的實(shí)例

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

針對(duì) file 對(duì)象的實(shí)例

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

針對(duì) folder 對(duì)象的實(shí)例

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

file 對(duì)象參考手冊(cè) 完整的 file 對(duì)象參考手冊(cè)
相關(guān)文章