Folder Sorting Help

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
devilparada
Posts: 22
Joined: 05 May 2017 15:16

Folder Sorting Help

Post 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!

highend
Posts: 13277
Joined: 06 Feb 2011 00:33

Re: Folder Sorting Help

Post 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
cc.png (12.76 KiB) Viewed 1189 times
One of my scripts helped you out? Please donate via Paypal

devilparada
Posts: 22
Joined: 05 May 2017 15:16

Re: Folder Sorting Help

Post by devilparada »

Wolaa! thanks it worked!

devilparada
Posts: 22
Joined: 05 May 2017 15:16

Re: Folder Sorting Help

Post 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!

highend
Posts: 13277
Joined: 06 Feb 2011 00:33

Re: Folder Sorting Help

Post 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)
One of my scripts helped you out? Please donate via Paypal

devilparada
Posts: 22
Joined: 05 May 2017 15:16

Re: Folder Sorting Help

Post by devilparada »

Thanks @highend very much problem solved.

devilparada
Posts: 22
Joined: 05 May 2017 15:16

Re: Folder Sorting Help

Post 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?
Attachments
Untitled.png
Untitled.png (22.1 KiB) Viewed 1171 times

highend
Posts: 13277
Joined: 06 Feb 2011 00:33

Re: Folder Sorting Help

Post by highend »

Code: Select all

    $secondPicture = gettoken(quicksearch("/types={:Image} /n", <cc_item>, "|"), 2, "|");
    return eval(replace(property("#image.dimensions", $secondPicture), "x", "*"));
One of my scripts helped you out? Please donate via Paypal

Post Reply