Make sortinto_directories use Directory.EnumerateFiles instead of Directory.GetFIles(). So can go through each extension belonging to each folder and sort the files gotten of that extension instead of going through each file. Also every path is not loaded into memory all at once this way, would be more efficient.
Make sortinto_directories use Directory.EnumerateFiles instead of Directory.GetFIles(). So can go through each extension belonging to each folder and sort the files gotten of that extension instead of going through each file. Also every path is not loaded into memory all at once this way, would be more efficient.