Page 1 of 2
ItemCount + Folder Exclusion
Posted: 13 Sep 2015 02:06
by armsys
Is it impossible to hunt all folders with one (1) item but the respective path can't contain the "magazine" word (wildcard) anywhere?
Something like that: prop:#itemcount: 1 AND !(*\*magazine*\*)
Re: ItemCount + Folder Exclusion
Posted: 13 Sep 2015 23:21
by armsys
Hello! Anybody home?
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 13:15
by admin
Your search term is wrong, but it would not work even if it would be right. Bugs...

... I'm working it out right now...
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 13:55
by admin
Next beta you do this:
Code: Select all
prop:#itemcount: 1 AND !path: magazine
Or better in this sequence -- likely to run faster since only items with path != magazine are content-counted (Boolean AND-optimization):
Code: Select all
path: != magazine AND prop:#itemcount: 1
This works the same:
Code: Select all
path: !magazine AND prop:#itemcount: 1
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 14:06
by armsys
admin wrote:Your search term is wrong, but it would not work even if it would be right. Bugs...

... I'm working it out right now...
What a charming paradox!
admin wrote:Next beta you do this:
Or better in this sequence -- likely to run faster since only items with path != magazine are content-counted (Boolean AND-optimization)...
Stunning! Awesome! Faster than my typing.
I like you more than Captain America! Thanks Don!

Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 14:07
by admin
Just give me money, and it's okay.

Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 16:46
by armsys
An innocuous typo is accidentally discovered:
Original
//all items with folder "saturn" anywhere in the path
Perhaps Don's intended meaning:
//all items with folder "saturn" NOT anywhere in the path
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 16:47
by armsys
Thanks for adding a time-saving Find Files feature.

Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 16:50
by admin
armsys wrote:
Perhaps Don's intended meaning:
//all items with folder "saturn" NOT anywhere in the path
Absolutely, I will fix it right now, thanks!
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 17:30
by armsys
The following Find Files line (pattern) works fine:
*.txt & path: != \\fitness\\ & path: != \\assorted\\ & path: != \\$RECYCLE.BIN\\
Question:
How to combine \\fitness\\, \\assorted\\ and \\$RECYCLE.BIN\\?
Something like: path: != (\\fitness\\ | \\assorted\\ | \\$RECYCLE.BIN\\)
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 17:45
by admin
Re: ItemCount + Folder Exclusion
Posted: 14 Sep 2015 17:53
by armsys
Yes, it works robustly as expected.
Code: Select all
*.txt & !(path:fitness OR assorted OR $RECYCLE.BIN)
I didn't know the syntax is possible. Thanks Don.
Edit (2015.09.15 Tue 03:10:27 PM HKT)
Applying Don's above-mentioned optimization, I "optimize" the pattern as follows:
Code: Select all
!(path:fitness OR assorted OR $RECYCLE.BIN) & *.txt
Thanks Don.
Re: ItemCount + Folder Exclusion
Posted: 15 Sep 2015 01:01
by armsys
Houston, I have a problem!
Why would XY interpret the following 2 patterns differently?
!(path:planet | css) & *.epub
*.epub & !(path:planet | css)
Always the former fails (no items found) but the latter succeeds. But why?
I do set FindAllowMasterInvert=0.
It seems the negation (!) effect is still distributed and propagated throughout the entire pattern!
XY version: v15.70.0119
Re: ItemCount + Folder Exclusion
Posted: 15 Sep 2015 08:08
by highend
Re: ItemCount + Folder Exclusion
Posted: 15 Sep 2015 08:57
by admin
Tip: it's the "path:" prefix that is propagated...