@Натали, выполнить код
[[LIST]] = [[LIST]].sort(function(a, b){
a = a.split('/').pop().split('.')[0];
b = b.split('/').pop().split('.')[0];
a = isNaN(a) ? a.toLowerCase() : Number(a);
b = isNaN(b) ? b.toLowerCase() : Number(b);
if(a > b){
return 1;
};
if(a < b){
return -1;
};
return 0;
})
[[LIST]] - Переменная со списком файлов.