Last active
November 13, 2023 23:43
-
-
Save charliecm/3562285d23b1ab4f57db to your computer and use it in GitHub Desktop.
Useful metadata editing and batch renaming snippets using exiftool.
This file contains hidden or 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
| # Add -r to perform operations recursively (for subfolders) | |
| # Photo — rename files to date (e.g., 2015-10-Oct-28-10-28-31.jpg) | |
| # Replace -testname with -filename to confirm change | |
| exiftool -ext jpg -ext png -d "%Y-%m-%b-%d-%H-%M-%S%%-c.%%e" "-testname<CreateDate" . | |
| # Photos — change CreateDate metadata | |
| exiftool "-CreateDate=2017:05:17 12:00:00" IMG.jpg | |
| # Videos — change date to "Creation Date" (written by iOS) | |
| exiftool -ext m4v -ext mp4 -ext mov "-CreationDate>CreateDate" -"CreationDate>FileCreateDate" "-CreationDate>FileModifyDate" "-CreationDate>ModifyDate" "-CreationDate>TrackCreationDate" "-CreationDate>TrackModifyDate" "-CreationDate>MediaCreationDate" "-CreationDate>MediaModifyDate" . | |
| # Videos — change date to "Create Date" (written by digital cameras) | |
| exiftool -ext m4v -ext mp4 -ext mov "-CreateDate>FileCreateDate" "-CreateDate>FileModifyDate" "-CreateDate>ModifyDate" "-CreateDate>TrackCreateDate" "-CreateDate>TrackModifyDate" "-CreateDate>MediaCreateDate" "-CreateDate>MediaModifyDate" . | |
| # Videos — rename files to date (e.g., 2015-10-Oct-28-10-28-31.m4v) | |
| # Replace -testname with -filename to confirm change | |
| exiftool -ext m4v -ext mp4 -ext mov -d "%Y-%m-%b-%d-%H-%M-%S%%-c.%%e" "-testname<CreateDate" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment