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.
 
 
 
 
 
 

21 lines
494 B

#!/usr/bin/env bash
#Создан: Сб 03 май 2014 08:04:12
#Изменён: Пн 15 ноя 2021 10:31:16
#Сортировка и переименование 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
}