OK, it is ready. I replaced gpc() commands with a while loop, practically that was it. Thanks again!
I put the whole script here, just not to let things half done.
Code: Select all
end (strpos(tab("get", "path"), "paper:") != -1), "Can't be executed in a paperfolder view!";
$folder = "<curpath>";
$find = "*.txt";
$papername = "Custom Branch View";
$results = quicksearch("$find /f", $folder,, "s") . <crlf>;
$resFol = quicksearch("$find /fp", $folder);
foreach($fol, $resFol, <crlf>, "e") {
$count = -1;
while (gpc($fol, "component", $count, 1) != $folder) {
$results .= gpc($fol, "component", $count--, 1) . <crlf>;
}
}
$results = formatlist($folder . <crlf> . $results, "des", <crlf>) ;
paperfolder($papername, $results,, "n");
tab("new", "paper:$papername?/hn /flat");
sortby "Path", "a";
EDIT: I edited the script because I put the main folder to the top of the view, I like it better this way.
EDIT2: I have just listed the exe files in the Program files then in my Portables folder. Very cool! I am sure it would deserve being among the core functions of BV.
EDIT3: extended with highend's preventive measure to avoid XY being frozen