Using Bash text replacement for mass rename

Bash has some very powerful text replacement options called parameter expansion. This allowed me to easy mass rename a bunch of files that were .avi.mp4 to .mp4

for i in *.avi.mp4 ; do mv "$i" "${i%.avi.mp4}.mp4" ; done;

With these tools you have the ability to manipulate files very easily.

Leave A Reply
All content licensed under the Creative Commons License