在Linux下编写了一个bash脚本,对jpg格式的图片进行了批量重命名,功能简单,欢迎完善
#!/bin/bash
#Program:
# This program is to rename the pictures whose type is '.jpg' together
#History:
# 2013/10/6 David First release
count=1
for img in *.jpg
do
new=$count.${img##*.}
mv "$img" "$new" 2>/dev/null
if [ $? -eq 0 ];
then
echo "Renaming $img to $new"
let count++
fi
done