There are 3 or 4 files in same directory as below;
AAA.360p.mp4
AAA.450p.mp4
AAA.720p.mp4
AAA.1080p.mp4
Filenames of those files are almost the same except expression of frame resolution.
(AAA is example of file name. To present that those filenames are same except frame resolution.)
And There are several dots between AAA.
For example, filename is like this;
Interesting.Comedy.E10.200406.450p.mp4
Interesting.Comedy.E10.200406.720p.mp4
Interesting.Comedy.E10.200406.1080p.mp4
Sizes of each file are different
(file size : 360p < 450p < 720p < 1080p) → It is always true.
I'd like to keep only one file, the one that is largest size and delete all other files.
Location of directory is /volume1/video/
It will be run the command only on the synology. (to use task scheduler in the control panel)
If you explain to me, please include path of directory in my case as above.
(because I can't apply the code what you recommend to me for lack of my understanding. I apologize)
***
really part of the file name? Do all names start withAAA
or do you have many different prefixes? And, if you do, will there always be exactly 2.
characters in the name, or can you have something likefoo.bar.360p.mp4
? Will you be running the command on the synology itself or from a regular computer that has acccess to the synology drive? What tools can we use?***
came about when I "fixed" the formatting and generally tidied the question to make it readable.