My question is simple :
I have video files named as follows :
xxxx_yyy_720_3800.mp4xxxx_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.mp4exists and if the filexxx_yyy_720_8000.mp4exists, deletexxx_yyy_720_3800.mp4 - If there is only a file
xxx_yyy_720_8000.mp4and not a filexxx_yyy_720_3800.mp4, do nothing.
Any help would be greatly appreciated.
xxxx_yyy_720_3800.mp4the the number ofymay 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.mp4be deleted regardless of the number ofyinxxxx_yyy_720_8000.mp4)? – kos Jul 14 '15 at 17:15