Action to obtain the complete path of a VM Folder within the hierarchy tree in Aria Automation Orchestrator 8.x
In order to get the full path of a VM folder in the hierarchy tree using Aria Orchestrator, the following script can be used in an action element :
// Deepest level folder, eg. VmSubFolder-1-1 var path = ""; while (System.getObjectClassName(targetFolder) == "VcVmFolder") { System.log("Folder name: " + targetFolder.name); path = "/" + targetFolder.name + path; targetFolder = targetFolder.parent; } System.log("Path: " + path); return path;
And the final path will be - /vm/Folder2/Folder 3/Folder 4/Folder 5