Microsoft® JScript IsRootFolder Property |
Language Reference Version 3 |
Returns True if the specified folder is the root folder; False if it is not.
object.IsRootFolderThe object is always a Folder object.
The following code illustrates the use of the IsRootFolder property:var fs = new ActiveXObject("Scripting.FileSystemObject"); function DisplayLevelDepth(pathspec) { var f, n; f = fs.GetFolder(pathspec); if (f.IsRootFolder) window.alert("The specified folder is the root folder.") else { do { f = f.ParentFolder; n++ } while (!f.IsRootFolder) window.alert ("The specified folder is nested " + n + " levels deep.") } }