ASP ParentFolder ÊôÐÔ

¶¨ÒåºÍÓ÷¨

ParentFolder ÊôÐÔÓÃÓÚΪָ¶¨µÄÎļþ»òÎļþ¼ÐµÄ¸¸Îļþ¼Ð·µ»Ø folder ¶ÔÏó¡£

Óï·¨£º

FileObject.ParentFolder
FolderObject.ParentFolder

ʵÀý

Õë¶Ô File ¶ÔÏóµÄÀý×Ó

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("d:\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: D:\asp\test

Õë¶Ô Folder ¶ÔÏóµÄÀý×Ó

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("d:\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: D:\asp
VUE