You can see this thread : https://learn.microsoft.com/en-us/answers/questions/608117/how-can-i-get-files-from-the-hard-disk-as-array-in
Can't get the name of directories sorted by name
StewartBW
925
Reputation points
Hello experts,
I need to get the name of directories sorted by name, just like what is shown in the Windows explorer.
3 folders are in a path, Windows show them in the below order:
0_35_33
7_07_10
18_16_40
But Directory.GetDirectories and DirectoryInfo.GetDirectories both will return in the below order:
0_35_33
18_16_40
7_07_10
Note that the below lines will not help either:
.OrderByDescending(Function(p) p.Name).ToArray()
.OrderByDescending(Function(p) p.CreationTime).ToArray()
Please help :(