Change file ‘s name and extension in uppercase on Linux

Having a huge amount of files, I had to change the files in uppercase.

Just a quick command line/script that at change in uppercase the file’s name and extension based on the extension given.


echo “”
echo “Which extensions type of files would you like to change in uppercase?”
read file
for i in *.$file
j=`echo $i | tr ‘[a-z]’ ‘[A-Z]’`
mv $i $j

echo “This file has been renamed:”
echo “”
echo $i to $j

Leave a Reply