SC: bug with quicksearch()

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
autocart
Posts: 1422
Joined: 26 Sep 2013 15:22

SC: bug with quicksearch()

Post by autocart »

This is actually a SC bug, but since it might need some brainstorming, maybe more questions & answers, I put it in a separate thread.

In one of my scripts I have the following line:

Code: Select all

$CorrSubTPLs = quicksearch($TPL_Prefix_InCaseOfSubTPL . $art_no . "_* /d", "$rootFolderForNewPartsLists\$subfolderNameForSubPartsLists", "|");
where all variables contain strings.
$TPL_Prefix_InCaseOfSubTPL . $art_no . "_* /d"
might resolve to
"TPL_4.201.23_* /d"
$rootFolderForNewPartsLists contains a full mounted path to a folder on the company server
and $subfolderNameForSubPartsLists contains the name of a subfolder under that full path.

BUG: Sometimes (randomly, as it seems) it happens that quicksearch in the line above returns (as the rusults look like) the names of all files and subfolders in "$rootFolderForNewPartsLists"
instead of, as I would expect in the example, all subfolders in "$rootFolderForNewPartsLists\$subfolderNameForSubPartsLists" starting with "TPL_4.201.23_". (In this case NO folder (nor file) exists there that would start with "TPL_4.201.23_".)

EDIT: I have never had that problem using listfolder() for to achieve the same, e.g. like that:

Code: Select all

listfolder("$rootFolderForNewPartsLists\$subfolderNameForSubPartsLists", $TPL_Prefix_InCaseOfSubTPL . $art_no . "_*", 2+8);

Post Reply