When I sort by extension it's just fine: Files with same extension have the same color.
However, when I sort by file name, the color is applied in weired ways. As all file names are different, why some files are hightlighted?

Here is my settings:



Actually, I would like to have the same smart logic in cases when sorting column is a time field (like last modified), which does not seem to me to work that way. Therefore my wish (is not quite the theme of this thread)...Also sorting by Name renders some groups which wouldn't be as obvious without the highlights. Note that grouping in the Name column resorts to some smart algorithm that detects similar filenames, else there would be no groups since all Names have to be different in a folder. (Click to zoom)
If I'm interested in exact dupes rather than time spans the logic is perfect as it is now. The current logic applied on ISO-standard date/time fields would group the items by year -- not very interesting IMO.Borut wrote:Seems logical and in accord with http://xyplorer.com/release_11.50.htm#HighlightedGroups to me:Actually, I would like to have the same smart logic in cases when sorting column is a time field (like last modified), which does not seem to me to work that way. Therefore my wish (is not quite the theme of this thread)...Also sorting by Name renders some groups which wouldn't be as obvious without the highlights. Note that grouping in the Name column resorts to some smart algorithm that detects similar filenames, else there would be no groups since all Names have to be different in a folder. (Click to zoom)
Don, couldn't you apply the same smart logic (which you use with file names) on time fields by treating the time field content as if it would be a name made by date-time in the ISO-standard format? (It could be made even smarter by analysing the time span of all the listed files and dynamically adapting the categorisation.)
Oh, yes, I actually did not realise that your algorithm is not really smart at all.admin wrote:If I'm interested in exact dupes rather than time spans the logic is perfect as it is now. The current logic applied on ISO-standard date/time fields would group the items by year -- not very interesting IMO.
Code: Select all
Legend:
Z(i) String under question, from line i
Le(a,b) The length of the equal left part of the strings a and b
The idea of an algorithm (quite simplified):
i:=2;
Lcurrent := Le( Z(i-1), Z(i) );
while EnoughLines do
begin
Lnext := Le( Z(i), Z(i+1) );
IsGroupBorder := Lcurrent <> Lnext;
Lcurrent:=Lnext;
i:=i+1;
end;
delete group borders between the groups containing only one item;
So you find your algorithm smarter?Borut wrote:Oh, yes, I actually did not realise that your algorithm is not really smart at all.admin wrote:If I'm interested in exact dupes rather than time spans the logic is perfect as it is now. The current logic applied on ISO-standard date/time fields would group the items by year -- not very interesting IMO.What you need, IMHO, is the following (somewhat simplified, but should be enough, I believe):
In the case of ISO-coded date-time, a static parameter could be the number of string positions to be checked by Le (i.e. resolution level: seconds, minutes, hours, days...). This could be even determined dynamically, based on the context (that was, what I had in mind).Code: Select all
Legend: Z(i) String under question, from line i Le(a,b) The length of the equal left part of the strings a and b The idea of an algorithm (quite simplified): i:=2; Lcurrent := Le( Z(i-1), Z(i) ); while EnoughLines do begin Lnext := Le( Z(i), Z(i+1) ); IsGroupBorder := Lcurrent <> Lnext; Lcurrent:=Lnext; i:=i+1; end; delete group borders between the groups containing only one item;
I believe that this would generate more interesting results, both when comparing names and date-times.
Code: Select all
XY-01
XY-02
---------------
Xylophone-01
Xylophone-02
Code: Select all
XY-01
XY-02
Xylophone-01
---------------
Xylophone-02
Code: Select all
^(.*?-)\[?\d+\]?(-.*?)\.[^\.]+$My current infinitely simpler way also sees your 3 files as group. Show me an example where my way fails in a way that convinces me to change it.TheQwerty wrote:This just goes to show that there needs to be a way to define matching patterns for grouping.
I dream of regex...If all the captured groups match consider them a group!Code: Select all
^(.*?-)\[?\d+\]?(-.*?)\.[^\.]+$
Abc-0-def.rar
Abc-1000-def.zip
Abc-[12]-def.awesome
Would then all be grouped together, or whatever, the user is in full control.
A user definable regex would allow the user to do the following to achieve the same grouping via different means:admin wrote:My current infinitely simpler way also sees your 3 files as group. Show me an example where my way fails in a way that convinces me to change it.
Code: Select all
^(\d+).*$
Grouping (in case you can't make out the group from XY's default coloring):
100 Cats.txt
-
101 Cats.txt
101 Dalmatians-01.txt
101 Dalmatians-02.txt
101 Doggies-01.txt
101 Doggies-02.txtCode: Select all
Pattern: ^\d+ (.*?)[-\d]*\.[^\.]+$
Group by noun / Ignore number prefix:
100 Cats.txt
101 Cats.txt
-
101 Dalmatians-01.txt
101 Dalmatians-02.txt
-
101 Doggies-01.txt
101 Doggies-02.txtCode: Select all
Pattern: ^(\d+ .*?)[-\d]*\.[^\.]+$
Group by number prefix and noun:
100 Cats.txt
-
101 Cats.txt
-
101 Dalmatians-01.txt
101 Dalmatians-02.txt
-
101 Doggies-01.txt
101 Doggies-02.txtCode: Select all
Pattern: ^(\d)
Group by first character is a digit:
100 Cats.txt
101 Cats.txt
101 Dalmatians-01.txt
101 Dalmatians-02.txt
101 Doggies-01.txt
101 Doggies-02.txt
-
desktop.iniCode: Select all
Pattern: ^(.)
Group by the first characterYes, please leave the current (or a slightly - by whatever means - way) as a one-click option.admin wrote:Yes, I prefer to start simple.
Why?binocular222 wrote:Can I have an option to not using color when sort by name?