File & folder sorting order...

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
chumbo
Posts: 272
Joined: 04 Jan 2015 15:20

File & folder sorting order...

Post by chumbo »

Hi,
I'd like to have files & folders be given equal value when sorting, i.e. XYPlorer not 'know' what is a file or folder and just sort by whatever I decide fit.

As it stands, folders take priority in the Name column so when for ex. I try to sort files and folders alphabetically/Numerically using the 'Name' column in a tab, I would get this result (let's assume all files are called 'Files.txt' and folders: 'Folders'. They are then individually named differently with a number in front to reflect how I would want them to appear sorted in the tab view:

My current situation...

4 - Folder
5 - Folder
6 - Folder
1 - Files.txt
2 - Files.txt
3 - Files.txt


Is it possible to have them sorted so they look like this instead:

1 - Files.txt
2 - Files.txt
3 - Files.txt
4 - Folder
5 - Folder
6 - Folder

Thanks! :)

highend
Posts: 14997
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: File & folder sorting order...

Post by highend »

Configuration | Sort and Rename | Sort | [ ] Sort folders apart
One of my scripts helped you out? Please donate via Paypal

chumbo
Posts: 272
Joined: 04 Jan 2015 15:20

Re: File & folder sorting order...

Post by chumbo »

Great! Thx :)

But is there a way to have this occur only on some tab views and not across all of XYplorer? I see there a custom columns but I have no idea how to set them to have them do this? Or any other way is fine too of course.

highend
Posts: 14997
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: File & folder sorting order...

Post by highend »

No, that setting takes precedence over a custom column that you'd use to sort the entries
One of my scripts helped you out? Please donate via Paypal

chumbo
Posts: 272
Joined: 04 Jan 2015 15:20

Re: File & folder sorting order...

Post by chumbo »

Ah ok. So the 'Sort folders apart' is the only way of doing this? It can't be done using custom columns only or some other method that would be more easily reversible than having to go back in Configuration to make the change every time?

highend
Posts: 14997
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: File & folder sorting order...

Post by highend »

No, this isn't the only way

Menu - Tools - Customize List - [x] Manual Sorting
+ a one liner script

Code: Select all

sortbylist formatlist(<get ItemsNames |>, "s"), "|";
would work

or as a whole (but you can't get the state of the manual sorting flag reliable so use with care):

Code: Select all

    #414; // Tools - Customize List - Manual Sorting toggling
    sortbylist formatlist(<get ItemsNames |>, "s"), "|";
One of my scripts helped you out? Please donate via Paypal

chumbo
Posts: 272
Joined: 04 Jan 2015 15:20

Re: File & folder sorting order...

Post by chumbo »

Thanks, that works just fine! :)

Post Reply