Page 1 of 1
If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 05 Jun 2023 23:44
by Norn
Not sure if this is an issue. If Sort Folders Apart is checked, the custom column of the folders cannot be sorted.
FolderSizes2.png
If uncheck Sort Folders Apart, it will be sorted by number, I can modify the script to sort, it would be better if it can be improved.
FolderSizes.png
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 08:45
by admin
Maybe I did not understand what you mean, but I can sort folders by a custom column:
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 14:30
by Norn
1) I checked this option:
Configuration | General | Sort and Rename | Sort | Sort folders always ascending
2) If it can be improved, a custom column with random folder size:
Code: Select all
Snip: CustomColumn 1
XYplorer 24.40.0208, 2023/6/6 18:24:47
Action
ConfigureColumn
Caption
FolderSize
Type
3
Definition
$state = rand(1, 5);
switch ($state) {
case 1: return formatbytes(0, "FLEX");
case 2: return formatbytes(rand(0, 99999), "FLEX");
case 3: return formatbytes(rand(99999, 999999), "FLEX");
case 4: return formatbytes(rand(999999, 99999999), "FLEX");
case 5: return formatbytes("99999999999", "FLEX");
}
Format
0
Trigger
1
Item Type
1
Item Filter
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 15:03
by admin
You checked "Sort folders always ascending" and wonder why folders are not sorted?

Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 15:14
by Norn
Nope.

The first problem has been solved.
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 15:16
by admin
What's the second problem?
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 15:43
by Norn
it will be sorted by number, I can modify the script to sort, it would be better if it can be improved.
Not a problem, not sorted by KB, MB, GB.
Re: If Sort Folders Apart is checked, the custom column of the folders cannot be sorted
Posted: 06 Jun 2023 15:47
by admin
Ah I see. Try Format "Bytes".
And change your script to:
Code: Select all
$state = rand(1, 5);
switch ($state) {
case 1: return 0;
case 2: return rand(0, 99999);
case 3: return rand(99999, 999999);
case 4: return rand(999999, 99999999);
case 5: return "99999999999";
}