Having trouble with itemcount less than....

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Dustydog
Posts: 321
Joined: 13 Jun 2016 04:19

Having trouble with itemcount less than....

Post by Dustydog »

I'm sure I'm simply doing something quite obvious wrong, some syntax quirk, but so far I haven't been able to figure it out:

Objective: List all the directories in the current pane with an item count less than (or equal to).

These Work as Expected:
prop:#itemcount: >= 4
prop:#itemcount: > 4
prop:#itemcount: 4 (or == 4, same thing)

Those Do Not:

prop:#itemcount: < 4
prop:#itemcount: <= 4

Those WILL give 4 and less, i.e. it won't show a folder with itemcount 5, but it will show an item count of 498 as well - it shows itemcounts that contain a 4 like a string, but operate on it as an integer as well (i.e. the single-digits 5-9)

(Aside: if subfolders is checked, and attribute=directory is not, it will also include files, which I suppose makes sense as itemcount=1, though it wasn't expected behavior, at least for me, and I find it a rather useless...unless...can anyone think of a file that would list a greater itemcount than 1? Maybe a hardlink or archive? Or is there some use in scripting?)

Would appreciate some direction here.

admin
Site Admin
Posts: 60538
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Having trouble with itemcount less than....

Post by admin »

Next beta has this change:

Code: Select all

    * SC property #ItemCount: When used in a search it does not return any files 
      anymore. E.g. this returns only folders with a non-recursive item count < 
      4, but no files:
        ? prop:#itemcount: < 4
Note the word non-recursive to explain your other issue...

Dustydog
Posts: 321
Joined: 13 Jun 2016 04:19

Re: Having trouble with itemcount less than....

Post by Dustydog »

Appreciate, as always, your taking a look at this and doing something so quickly about the odd behavior. It's a useful way of finding something with a throwaway file or two that's missing useful content - more reliable than ordering by size at times.

Post Reply