I have a folder with around 3k files in it that i need to go through and get the largest of each file type and only keep that one. is there a way to find the largest of a specific file type extension and then delete the remaining of said types. folder set up is like below:
(filename1).file1_abc
|
50kb |
(filename2).file1_def
|
50kb |
(filename3).file1_ghi
|
230kb |
(filenanme1).file2_abc
|
50kb |
(filename2).file2_def
|
187kb |
(filename3).file2_ghi
|
50kb |
... and so on for about 50 separated file types. the only ones id like to keep in the example would be (filename3).file1_ghi and (filename2).file2_def
is this possible to do? thank you for any help!