ASP ParentFolder 屬性
asp parentfolder 屬性

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

相關(guān)文章
- ASP 引用文件
- ASP Server 對象
- ASP Folder 對象
- ASP AdRotator
- AJAX 數(shù)據(jù)庫
- 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 方法