Quicksearch result accumulates
Posted: 14 Sep 2022 21:20
Hopefully not another stupid question, but probably is, I'm using quicksearch to get a listing of all "ini" files in a folder including subs but only those folders which contain both "ini" and "dbits" files. So, first I find all the folders that contain both "ini" and "dbits" files:
Then I'm using something like this:
where I want a listing of all the ini files in the above folders ($folders). My problem is, in the listing for $ini in the last or "Three" folder, I get a listing of the same "ini" file twice. I'm quite sure it has to do with the fact that ini file is being listed once for the number "Two" subfolder and then again for the "Three". The folder structure being: the base folder "One", under it is sub folder "Two", and under subfolder "Two" is subfolder "Three". Each folder has only one ini file contained in it.
I don't believe it's a bug, but is there some switch that would prevent the ini file in folder "Three" from appearing twice in the listing with exactly the same folder and filename? In this case, essentially each folder should be treated independently not accumulating. Or should I be using a different method entirely? (I know the listing is for folders "Two" and "Three"). Thanks.
$folders = quicksearch("prop:#contains.*.ini:1 AND prop:#contains.*.dbits:1", $sel_drive);
//works fineThen I'm using something like this:
$ini = quicksearch("*.ini", $folders);
where I want a listing of all the ini files in the above folders ($folders). My problem is, in the listing for $ini in the last or "Three" folder, I get a listing of the same "ini" file twice. I'm quite sure it has to do with the fact that ini file is being listed once for the number "Two" subfolder and then again for the "Three". The folder structure being: the base folder "One", under it is sub folder "Two", and under subfolder "Two" is subfolder "Three". Each folder has only one ini file contained in it.
I don't believe it's a bug, but is there some switch that would prevent the ini file in folder "Three" from appearing twice in the listing with exactly the same folder and filename? In this case, essentially each folder should be treated independently not accumulating. Or should I be using a different method entirely? (I know the listing is for folders "Two" and "Three"). Thanks.