ASP Path 属性
asp path 属性
完整的 file 对象参考手册path 属性用于为指定的驱动器、文件或文件夹返回路径。
语法
driveobject.path
fileobject.path
folderobject.path
fileobject.path
folderobject.path
针对 drive 对象的实例
<%
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:
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:
针对 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
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
针对 folder 对象的实例
<%
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
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 对象参考手册
相关文章
- ASP Cookies
- ASP File 对象
- ASP Folder 对象
- ASP ADO
- ASP Content Rotator
- ASP Column 属性
- ASP Write 方法
- ASP ShortName 属性
- ASP Move 方法
- ASP Keys 方法
- ASP Remove 方法
- ASP CacheControl 属性
- ASP Charset 属性
- ASP IsClientConnected 属性
- ASP BinaryWrite 方法
- ASP Form 集合
- ASP TotalBytes 属性
- ASP SessionID 属性
- ASP Execute 方法
- ASP MoveFile 方法