Quantcast
Channel: Sort a list of names containing numbers by the numeric value - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Sort a list of names containing numbers by the numeric value

$
0
0

I would like to sort a list which includes a set such as;

100.avi

10000.avi

10002.avi

1003.avi ....

I need to do some process using the files in numeric order. If I use sorted it does not care about the values, it sorts on the first character, second character, and so on - string sorting.

I tried to use [:-4] but I tried to do this on the list not the element of the list. Because it is late when I have the element. Is there any way?

Thanks in advance


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images