Natural sorted list of files

Dmitry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 6 08:43:45 PST 2017


Hi. I'm need get list of files in the directory, with natural 
sort, like:
file_2
file_8
file_10
file_11
file_20
file_100
etc.

Found this https://rosettacode.org/wiki/Natural_sorting#D
but there is error on ".groupBy!isDigit" (Error: no property 
'groupBy' for type 'string').

with deleted line it works, but order is incorrect, like:
file_1
file_10
file_11
file_100
file_2
file_20
etc.

How can I do this?


More information about the Digitalmars-d-learn mailing list