I have a very large directory of files, each with it'd own subdirectory. In those subdirectories are videos of various qualities (1080p, 720p... etc). I only want to keep the video of the highest quality (therefore the largest size). Is there a way to do this via command-line or batch file?
Parent_directory - Video_A -- Video_A_1080p --video_A_720p -Video_B -- Video_B_1080p --video_B_720p -- Video_B_480p
Note that the name of the videos do not necessarily have the resolutions in the file name. I'm just illustrating the directory structure.
The result should be:
Parent_directory - Video_A -- Video_A_1080p -Video_B -- Video_B_1080p