use this simple code in bash shell. The following code will change all xxx.jpg files to XXX.jpg in any particular working directory.
1 2 3 4 5 6 7 8 | 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