photobydate: check for file existence to supress useless error
This commit is contained in:
parent
fc26efcafd
commit
15b79419de
|
@ -201,9 +201,11 @@ suffix() {
|
|||
alias exifcopy="exiftool -tagsFromFile"
|
||||
photobydate() {
|
||||
for i in ${*:-(#i)*.(JPG|CR2)}; do
|
||||
if [[ -e $i ]]; then
|
||||
dir=$(exiftool -p '$DateTimeOriginal' $i | tr ':' '-' | cut -d' ' -f1;)
|
||||
mkdir -p $dir
|
||||
mv ${i:r}.* $dir
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue