I have a directory with files, whose names I need to standardize.
The names like audio_32.mp4.mp4
I would like to change to audio_0-32.mp4
. That is, I would like to add a zero after the underscore and introduce a hyphen afterwards. The files differ by the number in their name. That is, there will also be a file named audio_33.mp4.mp4
and so on. I would like to leave all other files and patterns unchanged. It is fine if removing the tail .mp4
and adding the zero are dealt with as separate tasks.
How can I do this efficiently?