tutorial pengembangan web terbaru
 

ASP ParentFolder Property


<Complete Reference Berkas Object

Properti parentFolder digunakan untuk mengembalikan objek folder untuk induk dari file atau folder tertentu.

Sintaksis

FileObject.ParentFolder

FolderObject.ParentFolder

Contoh untuk objek 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
%>

Output:

The file test.asp is in the folder: C:\asp\test

Misalnya untuk objek 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
%>

Output:

The folder test is in the folder: C:\asp

<Complete Reference Berkas Object