Created
October 12, 2013 01:52
-
-
Save jgambill/6944746 to your computer and use it in GitHub Desktop.
Use exiftool to: remove a field, copy DateTimeOriginal to all dates fields, change 'JPG' file extensions to 'jpg', rename files in chronological order using date and an incremented id #. I have this as an Automator workflow (Folder Action); therefore, these actions are performed on all image files in the specified directory (/Users/username/path…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /Users/username/path/to/process/folder | |
# remove MakerNotes field to appease iOS 7 pics in exiftool | |
exiftool -MakerNotes= * | |
# copy DateTimeOriginal to all dates fields | |
exiftool "-FileModifyDate<DateTimeOriginal" * | |
exiftool "-AllDates<FileModifyDate" * | |
exiftool "-FileModifyDate<CreateDate" * | |
# remove original files | |
rm *_original | |
# make all jpeg files have lowercase extension | |
for i in *.JPG; do mv "$i" "${i%.JPG}".jpg; done | |
# rename files by date/time (yyyymmdd-##.jpg), ordered by FileModifyDate field | |
exiftool -fileOrder FileModifyDate "-filename<FileModifyDate" -d %Y%m%d%%-.2nc.%%e * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment