Page 1 of 1

How to retrieve Branches of a MiniTree?

Posted: 03 Aug 2018 14:36
by SkyFrontier
I'd like to have a list of the loaded elements of a branch out of miniTree. How could I achieve that?

(I know, I know - quite a lame question, but I'm not at scritpting as much I once was...)

Re: How to retrieve Branches of a MiniTree?

Posted: 03 Aug 2018 15:06
by highend
One way:

Code: Select all

    $branch = "D:\Users\Highend\Development";
    $branch = regexreplace($branch, "([\\.+(){\[^$])", "\$1");
    $elements = regexmatches(get("tree", <crlf>), "$branch.*", <crlf>);

Re: How to retrieve Branches of a MiniTree?

Posted: 03 Aug 2018 15:14
by SkyFrontier
Awesome! Thanks once again, highend!