I wrote a small bash script for converting file extension to lower.
#!/bin/bash PATH="/somwhere_in_the_world/" EXTS=("jpg" "gif" "png") for ((I=0; I<${#EXTS[@]}; ++I )) do FILES=`find $PATH ! -type f -iname "*."${EXTS[$I]}`; for FILE in $FILES; do FNAME=`expr $FILE : '\(.*\)\.\w\+'` LOWER=$FNAME"."${EXTS[$I]} if [ $FILE != $LOWER ]; then mv $FILE $LOWER echo "$FILE converted to lower case."; fi; done; done;
コメント