Copy and sort photos inside Year/Month/Day directory structure exiftool -v -o $photosWithoutDate/%f%-c.%e -r '-FileName<CreateDate' -d $photosDir/%Y/%m/%d/%%f%%-c.%%e $sourceDir Remove duplicates from $photosDir fdupes -r --delete --immediate $photosDir