ASP ParentFolder 属性
asp parentfolder 属性
完整的 file 对象参考手册parentfolder 属性用于为指定文件或文件夹的父级返回 folder 对象。
语法
fileobject.parentfolder
folderobject.parentfolder
folderobject.parentfolder
针对 file 对象的实例
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\asp\test\test.asp")
response.write("the file test.asp is in the folder: ")
response.write(f.parentfolder)
set f=nothing
set fs=nothing
%>
输出:
the file test.asp is in the folder: c:\asp\test
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\asp\test\test.asp")
response.write("the file test.asp is in the folder: ")
response.write(f.parentfolder)
set f=nothing
set fs=nothing
%>
输出:
the file test.asp is in the folder: c:\asp\test
针对 folder 对象的实例
<%
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\asp\test")
response.write("the folder test is in the folder: ")
response.write(fo.parentfolder)
set fo=nothing
set fs=nothing
%>
输出:
the folder test is in the folder: c:\asp
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\asp\test")
response.write("the folder test is in the folder: ")
response.write(fo.parentfolder)
set fo=nothing
set fs=nothing
%>
输出:
the folder test is in the folder: c:\asp
完整的 file 对象参考手册
相关文章
- ASP 引用文件
- ASP Server 对象
- ASP Folder 对象
- ASP AdRotator
- AJAX 数据库
- ASP 简介
- ASP Column 属性
- ASP DateCreated 属性
- ASP ParentFolder 属性
- ASP ShortName 属性
- ASP ShortPath 属性
- ASP Size 属性
- ASP ExpiresAbsolute 属性
- ASP AddHeader 方法
- ASP Contents.Remove 方法
- ASP ScriptTimeout 属性
- ASP GetLastError 方法
- ASP BuildPath 方法
- ASP GetDrive 方法
- ASP GetTempName 方法