Created
July 25, 2018 15:48
-
-
Save glynhudson/e7c02cd94352245857cc624908a199b5 to your computer and use it in GitHub Desktop.
Rename extension of all files in a folder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rename all files with extension passed as argument 1 to m4v | |
# e.g to rename MOV extension to m4v ./rename-m4v.sh MOV | |
for file in *.$1 | |
do | |
mv "$file" "${file%.$1}.m4v" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment