RootCount

Description

The number of root directories located in the currently connected database.

Syntax

property RootCount: <Integer>;

Example

PowerShell:

if($SOS.RootCount -gt 0){
  $SOS.RootDirectory = $SOS.RootPaths(0)
}

VBS:

if SOS.RootCount > 0
  SOS.RootDirectory = SOS.RootPaths(0)

Checks if there is at least one root directory in the connected database. if so, the path of this root is queried and used as new “RootDirectory” property.