Posted Fri, 25 Jun 2021 05:27:51 GMT by

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:















... 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!



Posted Tue, 29 Jun 2021 03:27:33 GMT by


Looking for the largest file in the folder would be pretty easy.  You can get a dataset with all the files then
loop that dataset and build another dataset that contains a list of all the extensions
the loop that new dataset and get a list of files with only that extension.  Loop that list and find the largest file
and then do that for every extension.  Please let us know if this makes sense.
Thanks, Chris

You must be signed in to post in this forum.