SpaceObServer.Application.FirstChildID

<< Zum Inhaltsverzeichnis >>

Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.FirstChildID

Description

Returns the identifier (ID) for the first sub directory of the directory with the passed ID.
 

Syntax

FirstChildID (ParentID : <Integer>): <Integer>
 

Parameters

ParentID

The identifier for the directory to get the first child directory of.

Return Value

The ID for the first child directory of the passed directory ID. If the directory with the passed ID has no sub directories 0 is returned.

 
Example

PowerShell:

$FolderID = $SOS.FirstChildID($SOS.RootFolderID)
if($FolderID -eq "0"){}

VBS:

FolderID = SOS.FirstChildID(SOS.RootFolderID)
if FolderID=0 Exit();

The variable "FolderID" is set to the ID of the first sub directory of the current root directory.
The if statements checks if there are any sub directories and calls Exit() if there are no sub directories.