Page 1 of 1

Searching Meta Properties

Posted: 21 Mar 2014 04:03
by Enternal
So I wanted to search for all images that have a width of less than 1024. I set file types to "Images" and used the following in the name field for property search:

Code: Select all

Prop:Width: < 1024
I ended up with all pictures including pictures that have a width of larger than 1024. Tried again using Width's index number of #162 so:

Code: Select all

Prop:#162: < 1024
and got exactly what I wanted. Is there something I'm doing wrong or is this some kind of bug? I did the same thing for height:

Code: Select all

Prop:Height: < 1400
Prop:#164: < 1400
and once again, the search using the property index value works.

Re: Searching Meta Properties

Posted: 21 Mar 2014 09:55
by admin
Using words here is totally unreliable (MS's fault, not mine). Use the indices.

Re: Searching Meta Properties

Posted: 21 Mar 2014 20:17
by Enternal
Ah I see. Since indices are not always the same for each computer, perhaps it's possible in the future for XYplorer to try to match up the indices with the name? For example, if a user type in prop:[propertyname]:[value], XYplorer will internally convert [propertyname] to whatever the indices is for that particular computer. Is that possible?

Re: Searching Meta Properties

Posted: 21 Mar 2014 20:22
by admin
Good idea, but has caveats (locale must match!). See notes here with the similar function:

Code: Select all

v12.60.0015 - 2013-07-23 13:53
    + SC get got a new named argument "propertyindex".
      Syntax: get("propertyindex", propertyname)
        propertyname: Name of the property.
                      It's identical to the column header in Details 
                      view, and has to be in the system locale (e.g. in 
                      German in a German Windows).
        return:       The numerical index of that property.
                      Or "-1" if the propertyname is not found.
      Note:
        The return varies from Windows to Windows, and from system to system.
      Usage:
        Make scripts using extended properties (SC property, SC report 
        with "prop:") portable and working under different Windows versions.
      Examples:
        text get("propertyindex", "besitzer");    // -> might return "8" in a German XP
        text get("propertyindex", "orientation"); // -> might return "254" in a English Win7

Re: Searching Meta Properties

Posted: 22 Mar 2014 09:39
by admin
Added something. In the next version you can do this:

Code: Select all

Prop:*Width: < 1024
The prefixed asterisk will internally convert "Width" to its property index.

Re: Searching Meta Properties

Posted: 22 Mar 2014 12:57
by Enternal
admin wrote:Added something. In the next version you can do this:

Code: Select all

Prop:*Width: < 1024
The prefixed asterisk will internally convert "Width" to its property index.
Awesome! Thanks! Now I don't need to go through that list all the time whenever I switch computers and stuff.

EDIT: It works wonderfully! :biggrin: Thanks!

Re: Searching Meta Properties

Posted: 31 Jul 2014 01:44
by CookieMonster
Enternal - Where did you find the index number ?