Previous PageNext Page

7.17.10 IsRootFolderProperty

Returns True if the specified folder is the root folder; False if it is not.
 

Syntax

object.IsRootFolder

object
A Folder object.

Remarks

The following code illustrates the use of the IsRootFolder property:
 

function DisplayLevelDepth(pathspec)

{

var fs, f, n;

fs = new ActiveXObject("Scripting.FileSystemObject");

f = fs.GetFolder(pathspec);

n = 0;

if (f.IsRootFolder)

Response.Write("The specified folder is the root folder.")

else

{

do

{

f = f.ParentFolder;

n++;

}

while (!f.IsRootFolder)

Response.Write("The specified folder is nested " + n + " levels deep.")

}

}


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page