I have a set of files, all of them nnn.MP4.mov. How could I rename them so that it is just nnn.mov?
nnn.MP4.mov
nnn.mov
First, do a dry run (will not actually rename any files) with the following:
for file in *.mov do echo mv "$file" "${file/MP4./}" done
If it all looks fine, remove the echo from the third line to actually rename the files.
echo
548k questions
547k answers
4 comments
86.3k users