Page 1 of 2
The problem of folder sorting
Posted: 04 May 2018 03:51
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
Re: The problem of folder sorting
Posted: 04 May 2018 05:02
by liyinan
The script above is:
Code: Select all
sortby "path","a";
sortby "type","a",1;
Re: The problem of folder sorting
Posted: 04 May 2018 05:08
by liyinan
Run this script:
the sort is correct. "Long_ago_01.txt" is in first positions, and "Long_ago_02.txt" is in second positions.
05.png
Re: The problem of folder sorting
Posted: 04 May 2018 10:05
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.
Re: The problem of folder sorting
Posted: 04 May 2018 11:14
by liyinan
You're right. Run this script:
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.
Re: The problem of folder sorting
Posted: 04 May 2018 11:19
by liyinan
Does the parameter need to add "2"?
snap_screen_20180504171702.png
Re: The problem of folder sorting
Posted: 04 May 2018 11:34
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.
Re: The problem of folder sorting
Posted: 04 May 2018 12:03
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?
Re: The problem of folder sorting
Posted: 04 May 2018 12:31
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.
Re: The problem of folder sorting
Posted: 04 May 2018 13:19
by admin
OK, I'll see what I can do.
Re: The problem of folder sorting
Posted: 04 May 2018 13:40
by liyinan
Thank you very much.
Re: The problem of folder sorting
Posted: 04 May 2018 14:41
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...
Re: The problem of folder sorting
Posted: 04 May 2018 16:16
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".
Re: The problem of folder sorting
Posted: 04 May 2018 16:20
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?
Re: The problem of folder sorting
Posted: 04 May 2018 16:30
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.)