I have got a folder, which contains files:
s1, s2, s3, ... s9, s10, s11, ... s99, s100, s101, s102, s103, ...,
and script, which prints a list of these files:
filesystem = require('fs');
filesystem.readdirSync('./folder').forEach(function (file) {
console.log(file);
});
but i get a unordered list like this:
s0, s1, s10, s100, s101, s102, s103, ... s11, s110, s111, s112, s12
I know a reason, but i want to get the "number" ordered list, like this:
s1, s2, s3, ... s9, s10, s11, ... s99, s100, s101, s102, s103, ...,
s##for every single file you'll be working with?