Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Select (copy, move or delete) larger of 2 files

$
0
0

hi all -

how do I move (or delete) the larger of 2 files within a directory?

I have a bunch of files with same name but different extension, e.g.,  file001.gif; file001.jpg; file002.gif; file002.jpg;

I want to end up with the smallest (fewest bytes) file, only, in the directory, but making sure I have exactly 1, only, of each filename. 

file001.gif;

file002.jpg;

file003.gif;

file004.gif; etc.

cheers, and tia


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>