Is is possible to get files that is ordered same as in Windows Explorer
I know \"natural sort\", but it\'s not what I need, I need to get the file list ordered by th
using System.Linq; DirectoryInfo info = new DirectoryInfo(""); FileInfo[] files = info.GetFiles().OrderBy(p => p.CreationTime).ToArray(); foreach (FileInfo file in files) { // DO Something... }
using System.Linq;
DirectoryInfo info = new DirectoryInfo(""); FileInfo[] files = info.GetFiles().OrderBy(p => p.CreationTime).ToArray(); foreach (FileInfo file in files) { // DO Something... }
here is the sample code for get files in directory by creation time.
You can get files by size same way.