use this simple code in bash shell. The following code will change all xxx.jpg files to XXX.jpg in any particular working directory.
for i in *.jpg; do ext=${i##*.}; name=$(basename "$i" ".$ext" | tr '[a-z]' '[A-Z]').$ext; if [ "$i" != "$name" ] then mv $i $name; fi done;
Leave a Reply