C# sort filenames code example
Example: sort file name with C#
string[] files = Directory.GetFiles(path).OrderBy(f => int.Parse(Path.GetFileNameWithoutExtension(f))).ToArray();
string[] files = Directory.GetFiles(path).OrderBy(f => int.Parse(Path.GetFileNameWithoutExtension(f))).ToArray();