Page 1 of 1

Folder Sorting Help

Posted: 05 May 2017 15:23
by devilparada
Hello There,

I have like 50 folders with images inside with different resolution in each folder. I want to sort folders by high image resolution inside folder First.

One folder have 5000x6000 res pics
Another folder 3000x2000 res pics
one so one 50 folders!

smallest i have is 1500x1000.

i want folders to sort higher res first and smallest res image containing folder at last..

how it is possible with Xyplorer!

Thanks!

Re: Folder Sorting Help

Posted: 05 May 2017 15:45
by highend
You could use a custom column with a script and use this column for sorting...

Code: Select all

    $firstPicture = gettoken(quicksearch("/types={:Image} /n", <cc_item>, "|"), 1, "|");
    return property("#image.dimensions", $firstPicture);
cc.png

Re: Folder Sorting Help

Posted: 05 May 2017 17:02
by devilparada
Wolaa! thanks it worked!

Re: Folder Sorting Help

Posted: 05 May 2017 17:13
by devilparada
your script check resolution of first image in folder. but some of the my folder have Album cover art which is small .Need Script to get 2nd image not first. because first image in every folder is just cover album artwork.

Please update the script!

Re: Folder Sorting Help

Posted: 05 May 2017 17:18
by highend
Just use a 2 instead of 1 in the script and if necessary, replace $firstPicture with $secondaryPicture (you only need to do the first thing, the second one is just a "logical" thing)

Re: Folder Sorting Help

Posted: 05 May 2017 17:24
by devilparada
Thanks @highend very much problem solved.

Re: Folder Sorting Help

Posted: 05 May 2017 21:35
by devilparada
Hello Highend,

i am facing sorting error . u can see 1000x665 res is above 988x1200 but they are smaller is resolution. I think the sorting is done only by firs value that is "Width".
what if we multiple 1000*665 = 665000
and 988*1200 = 1185600 Then sort by answers? isnt it possible? can you write a script?

Re: Folder Sorting Help

Posted: 05 May 2017 21:54
by highend

Code: Select all

    $secondPicture = gettoken(quicksearch("/types={:Image} /n", <cc_item>, "|"), 2, "|");
    return eval(replace(property("#image.dimensions", $secondPicture), "x", "*"));