DIAdem Help

Property: IsRootFolder for Folder

  • Updated2024-09-12
  • 1 minute(s) read

Property: IsRootFolder for Folder

Checks whether a folder is the root folder.

Object.IsRootFolder
ObjectFolder
Object with this property
Object.IsRootFolderBoolean value with read access
The value is TRUE if the folder is the root folder, otherwise the value is FALSE.

The following example specifies the number of superordinate folders of a folder:

Function CountLevelDepth(sPath)
  Dim fso, oMyFolder, iCount
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFolder = fso.GetFolder(sPath)
  iCount = 0
  Do While Not oMyFolder.IsRootFolder
    Set oMyFolder = oMyFolder.ParentFolder
    iCount = iCount + 1
  Loop
  CountLevelDepth = iCount
End Function

Log in to get a better experience