Page 1 of 1

list sort by suffix/prefix

Posted: 20 Jun 2025 23:06
by Redan13
i find i often need to sort by a specific part of a name since duplicating a file adds a suffix ect. ex: example_0109.txt
i did a bit of searching and wast able to find a script or way to do this if anyone can be helpful with a soluton

Re: list sort by suffix/prefix

Posted: 20 Jun 2025 23:11
by highend
And now you want to sort by the part 0109?

Re: list sort by suffix/prefix

Posted: 20 Jun 2025 23:14
by Redan13
correct.

Re: list sort by suffix/prefix

Posted: 20 Jun 2025 23:17
by highend
Add a scripted custom column and use e.g. this script (for this special case):

Code: Select all

return gettoken(<cc_base>, 2, "_");
Then you can use that column to sort

Re: list sort by suffix/prefix

Posted: 20 Jun 2025 23:40
by Redan13
that helps thanks. but what about if it would be somthing like: example_111_0109-11.txt ; and still trying to sort by the 0109 segment?

Re: list sort by suffix/prefix

Posted: 20 Jun 2025 23:52
by highend
Then you change to a more appropriate script:
return gettoken(gettoken(<cc_base>, 3, "_"), 1, "-");

Re: list sort by suffix/prefix

Posted: 28 Jun 2025 19:38
by Redan13
that works thanks!