Thanks, but I cannot use any of those built in or add-on classes/functions as this is an internal script language, I only can use its defined commands, which primarily includes the above mentioned 'getDirList', the rest has to be manipulated by appending variables and through array management; also I can use math operators, if, elseif, else, while, etc., and 'goto' or 'goSub' in order to visit another section of code and return, sort of like calling a function.
So, I need to manually track where I am at each level of the directory structure, moving forward and down, then backout at each deadend, to continue moving downwards until the last directory is reached.
$folder_path is the current path information,
$folder is an array that holds the folder names and their index,
$i is the total count of folders,
$directories[$i] is an array holding the full directory paths that have been checked, in order from top to bottom, and following as they branch outwards
$c is the current location within the directory structure,
$directories[$c] is the folder name for the index being checked in relation to $c
$directories[$c][1] is the folder index being checked in relation to $c