-2

More specifically, I have hundreds of files of which ALL contain in their filename a sequence of eight characters between two square brackets.

Example:

160-O.Terror.Está.A.Chegar.[617229A4].mp4

I want this to become:

160-O.Terror.Está.A.Chegar.mp4

How do I eliminate everything from, and including, .[ to ] in all my mp4 files using the terminal?

1 Answers1

1

Something like:

for f in *.mp4; do mv -n "$f" "${f%.[*}.${f##*.}"; done