rphoto: IMG -> img.
This commit is contained in:
parent
13ca6a67c0
commit
98509ed1b8
|
@ -27,7 +27,7 @@ doRename()
|
|||
{
|
||||
local filename=$(basename $1)
|
||||
#echo "$filename"
|
||||
jhead -nIMG%Y%m%d-%H%M%S "$filename"
|
||||
jhead -nimg%Y%m%d-%H%M%S "$filename"
|
||||
}
|
||||
|
||||
doRenameCarefully()
|
||||
|
@ -35,9 +35,13 @@ doRenameCarefully()
|
|||
local filename=$(basename $1)
|
||||
#echo "$filename"
|
||||
if [[ $filename =~ IMG[12][90][0-9][0-9][01][0-9][0-3][0-9][012][0-9][0-5][0-9][0-5][0-9].* ]]; then
|
||||
local target=${filename:0:11}-${filename:11}
|
||||
local target=img${filename:3:8}-${filename:11}
|
||||
if [ -e "$target" ]; then
|
||||
echo "$filename -r> $target ABORT because file already exists."
|
||||
else
|
||||
echo "$filename -r> $target"
|
||||
mv -f "$filename" "$target"
|
||||
mv "$filename" "$target"
|
||||
fi
|
||||
elif [[ $(exiftool $filename | grep -c "Date/Time Original") > 0 ]]; then
|
||||
#echo "yop $filename"
|
||||
doRename "$filename"
|
||||
|
|
Loading…
Reference in New Issue