The problem of folder sorting

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

The problem of folder sorting

Post by liyinan »

There are two files in the folder. After running the script, why is the order like this? "Long_ago_02.txt" is in first positions, and "Long_ago_01.txt" is in second positions. As shown in Figure "03.png".

01.png
02.png
03.png
04.png
To see the attached files, you need to log into the forum.

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

The script above is:

Code: Select all

  sortby "path","a";
  sortby "type","a",1;
Last edited by liyinan on 04 May 2018 05:09, edited 2 times in total.

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

Run this script:

Code: Select all

sortby "type","a";
the sort is correct. "Long_ago_01.txt" is in first positions, and "Long_ago_02.txt" is in second positions.

05.png
To see the attached files, you need to log into the forum.

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

Re: The problem of folder sorting

Post by admin »

In your examples the Name field is not sorted at all. So its order is not defined. Within blocks where the sorted fields (Path and Type) are identical the order of the Name field is chaotic.

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

You're right. Run this script:

Code: Select all

sortby "type","a";
The result is sort by type. Why is the column of "name" the same correct? "Long_ago_01.txt" is in first positions, and "Long_ago_02.txt" is in second positions.


If I want to sort by path, type and name, do I need such script?

Code: Select all

  sortby "path","a";
  sortby "type","a",1;
  sortby "name","a",2;
But the third line of the script is wrong.

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

Does the parameter need to add "2"?
snap_screen_20180504171702.png
To see the attached files, you need to log into the forum.

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

Re: The problem of folder sorting

Post by admin »

Well, XYplorer does not support sorting by a 3rd field. I would have to add this, but it would slow down every file listing.

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

Re: The problem of folder sorting

Post by admin »

Just curious: How would you expect/wish the order of the Name column after this:

Code: Select all

sortby "path","a";
  sortby "type","d",1;
Ascending or descending?

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

Usually, I only sort by type, see my configuration file "pane.ini" below, and the name column is sorted in ascending order (it seems to be default). This is very good.
snap_screen_20180504180508.png
The following are special:
In search page, I sort by path and type. Please look at my configuration file "pane.ini" below. But the sorting of the name column is chaotic. I hope that the name column is also sorted in ascending order.
snap_screen_20180504180522.png
In the PaperFolders, there are no settings in the configuration file. I set them by script and sort them according to the path and type. I hope that the name column is also sorted in ascending order.
To see the attached files, you need to log into the forum.

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

Re: The problem of folder sorting

Post by admin »

OK, I'll see what I can do.

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

Thank you very much.

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

Re: The problem of folder sorting

Post by admin »

admin wrote:Just curious: How would you expect/wish the order of the Name column after this:

Code: Select all

sortby "path","a";
  sortby "type","d",1;
Ascending or descending?
Please answer this...

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

I downloaded the software from the website and opened it. The default is in ascending order by name.

Then I click on the type column. The files are ascending by type and the name column is in ascending order.

I click on the type column again, the type column is descending, and the name column is also in descending order. At present, the software is like this. I think this is good.

(English is not my mother tongue. I may not speak very well.)


Your question, my answer is: we do not know the habits of others, some people may want to ascend, some people want to descend. I hope to be ascending. The "sortby" function adds parameters to the user's own definition. For example:

Code: Select all

  sortby "path","a";
  sortby "type","a",1;
  sortby "name","a",2;
or:

Code: Select all

  sortby "path","a";
  sortby "type","a",1;
  sortby "name","a",1;     // "1" means sorting based on previous sorting.
In addition, "pane.ini" supports "Sort=Path, a; Type, a"; I think it can also support "Sort=Path, a; Type, a; Name, a".

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

Re: The problem of folder sorting

Post by admin »

Maybe you did not see the "d" in my example? The question is: If the secondary field is sorted descending should Name be descending a well?

liyinan
Posts: 17
Joined: 21 Apr 2018 05:49

Re: The problem of folder sorting

Post by liyinan »

I think if the column of type is descended from ascending order, the name column should be ascending.

I downloaded the software from the website and opened it. The default is in ascending order by name.
Then I click on the type column. The files are ascending by type and the name column is in ascending order.
I click on the type column again, the type column is descending, and the name column is also in ascending order.(Personally, I think so, but this is just a matter of habit, not right and wrong. Everyone has different ideas.)

Post Reply