Code: Select all
$folder = "C:\Downloads";
$find = "*.txt";
$exclusionlist = "";
$results = quicksearch("$find /f", $folder,, "s") . <crlf>;
$allfolders = quicksearch("/d", $folder);
foreach($fol, $allfolders, <crlf>, "e") {
if (gettokenindex($fol."*",$results,<crlf>) == 0) {
$exclusionlist .= $fol."|" ;
}
}
$exclusionlist = formatlist($exclusionlist, "des");
if ($exclusionlist) { ghost(regexreplace($exclusionlist, "(#|\[)", "[$1]"), 1); }
tab("new","$folder\?$find or attr:d /flat");
sortby "Path", "a";
Anyway, thank you for showing that it is indeed possible theoretically. You expressed it correctly for me: "if you really want it"
XYplorer Beta Club