My question is simple :
I have video files named as follows :
xxxx_yyy_720_3800.mp4
xxxx_yyy_720_8000.mp4
where yyy can vary in length (e.g yyyyyy or more y)
As I'm not used in shell scripts I'd like to delete automatically (in a specified folder)
- If a file with the name
xxx_yyy_720_3800.mp4
exists and if the filexxx_yyy_720_8000.mp4
exists, deletexxx_yyy_720_3800.mp4
- If there is only a file
xxx_yyy_720_8000.mp4
and not a filexxx_yyy_720_3800.mp4
, do nothing.
Any help would be greatly appreciated.
xxxx_yyy_720_3800.mp4
the the number ofy
may vary or is it also inxxxx_yyy_720_8000.mp4
? If so, how do those things relate (i.e. should any file matchingxxxx_yyy_720_3800.mp4
be deleted regardless of the number ofy
inxxxx_yyy_720_8000.mp4
)?