IsFolder¶
Description
Returns “true” if the passed identifier (ID) is a folder.
Syntax
IsFolder (ID : <Integer>): <Boolean>
Parameters
- ID
The identifier for which it should be checked whether it is a folder or not.
Return value
True if the passed ID is a folder. Otherwise False.
Example
PowerShell:
if($SOS.IsFolder($FolderID)){
$NextID = $SOS.FirstChildID($FolderID)
}
else{
$NextID = $SOS.NextSiblingID($FolderID)
}
VBS:
if SOS.IsFolder(FolderID) then
NextID = SOS.FirstChildID(FolderID)
else
NextID = SOS.NextSiblingID(FolderID)
Sets the variable NextID to the first child element if FolderID is a folder. Otherwise NextID is set to the next sibling element.