I have a large external USB drive "R:". Path "R:\target\" there has 5300 first-level folders. The folder names average ~50 chars long. My script, described here in simplified form, reads each folder name from that path and creates a new empty folder in path "G:\dumfold\" with the same name. G: is an internal SSD.
There is a match name $selbase, which I here set to "selbase". Then I use quicksearch() to search through G:\dumfold\ for target folders that come close to matching "selbase".
Here's the code, minus some irrelevant (I think) details:
Code: Select all
$dumfold = "G:\dumfold";
$trgpath = "R:\target";
$trgpathlst = folderreport("dirsrel", r, $trgpath, , , "|");
foreach ($targ, $trgpathlst, "|", e) {new("$dumfold\$targ", dir);}
$selbase = "selbase";
$targmbe = quicksearch("$selbase /n/d/fuzzy=30", $dumfold, "|");Since the quicksearch knows nothing at all about R:, my guess is that the very long strings involved (260K chars) cause an XY memory pointer to get confused. So the problem may not be with QS itself, but that's how it shows up here.
This happens repeatably in my script, when the QS match attempt follows the renaming of a folder in R:\target\. The rename would have resulted from the prior match attempt. So overall, my script successfully finds one match and renames an folder in R:\target, but on the next match attempt (the value of $selbase having been changed) quicksearch returns the junk string.
[Edit] The problem does not occur if the R:\target\ path has 1000 folders instead of 5300.
XYplorer Beta Club