Various Linux scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
486 B

#!/bin/bash
#Создан: Сб 03 май 2014 08:04:12
#Изменён: Ср 06 апр 2016 19:52:22
#Сортировка и переименование jpg-файлов по датам
BASE=${2:-.}
TYPE=${1:-jpg}
if [ "$TYPE" == "JPG" ]; then
ls "${BASE}/*.$TYPE" && for i in "${BASE}/*.$TYPE"; {
mv -iv "$i" "${i/JPG/jpg}";
}
TYPE="jpg"
fi
for file in "${BASE}/*.$TYPE"; {
exiftool -d "${BASE}/%Y.%m.%d/img_%Y.%m.%d_%H.%M.%S%%-c.%%e" "-filename<createdate" $file
}