Skip to content

Instantly share code, notes, and snippets.

@ncoevoet
ncoevoet / gist:5b321f63cc3cb125b9aa1156335d5bf7
Last active March 6, 2023 19:27
Order your photos from your usb card to your hard drive, ordered by years/month, no risk of override or accidental deletion with md5sum
#!/bin/bash
# Author : Nicolas Coevoet
# This script read exifs informations of files and copy them to output/YEAR/MONTH/yearmonthday_hourminutesecond.ext
# It checks md5sum in case file with the same name is found and skip it md5sum matchs or create a new one with _<digit> if different.
# Dependencies are exiftool exiv2
if [ ! -n "${1}" ]; then
echo "Usage : ./{0} src/ output/"
exit 1
fi