

- Exiftool mac copy filedatetime to datetimeoriginal how to#
- Exiftool mac copy filedatetime to datetimeoriginal install#
- Exiftool mac copy filedatetime to datetimeoriginal update#
- Exiftool mac copy filedatetime to datetimeoriginal archive#
Unorganized photos with corrupted and missing EXIF metadata. I've found these little snippets very useful for a folder with thousands of
Exiftool mac copy filedatetime to datetimeoriginal update#
If you have a file with the name foo_20180418_103000.jpeg (which is in the format YYYYmmdd_HHMMSS), but the EXIF date is incorrect, you can update the EXIF date from the filename with: $ exiftool "-AllDates nonjpeg.txtĪs a bonus, this is how you can iterate over the files in nonjpeg.txt and move it to a new folder called others: $ mkdir others To fix the modified date of the file that was destroyed with the previous action, run: $ exiftool -v "-DateTimeOriginal>FileModifyDate" * With the previous action, the EXIF date might be correct, but now the modified date is set to the date the tool was invoked. Set the file modification date based on EXIF date Change it according to your own needs: $ exiftool "-DateTimeOriginal-=0:0:0 11:0:0". The following examples shifts the time by -11 hours (suppose local time is 10:00 PM, Photos will be adjusted to 11AM (previous day)). When this happens, I have to change all my photos and update it with the correct timezone. Sometimes I forgot to change the time of my camera when I travel and I shoot in my local timezone. To update the EXIF date based on this date, call: $ exiftool -v "-FileModifyDate>AllDates" * But you know that the modified date of the file is correct because that's is the date the photo was created. Suppose a photo does have an incorrect date or no EXIF metadata. $ exiftool -p '$filename' -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"'. To find all images (in JPEG) without any date run the following, recursively: $ cd photos The first mistake when editing batch EXIF metadata is assuming that all images have EXIF metadata. progress provides a countdown and transfer statistics during the copyĪssuming all your photos are in one place, to remove all white spaces recursively, run the following: detox -r -v photos/.E copies extended attributes and resource forks (OS X only).
Exiftool mac copy filedatetime to datetimeoriginal archive#
a applies archive settings to mirror the source files exactly, including.To make a backup of your photo folder run: rsync -vaE -progress photos photos_backup Instead of using cp, it's better to use a tool that is faster and copes better with file permissions. This will come handy for scripting because you don't have to escape white spaces in your files. It will also clean up filenames with UTF-8 or Latin-1 (or CP-1252) characters in them (i.e: foo bar - quz.avi -> foo_bar-quz.avi). It replaces difficult to work with characters, such as spaces, with standard equivalents.
Exiftool mac copy filedatetime to datetimeoriginal install#
On macOS you can easily install it with: $ brew install exiftoolĭetox is a utility designed to clean up filenames. One final reminder, all the commands are only used on macOS, it might be different based on what OS you use.Įxiftool is a command line tool that allows you to change and manipulate the EXIF metadata of images. Always do a backup before you start working manipulating the data. During this time, I've gathered a set of small, short code pieces that allows me to change anything on a set of photos.īefore we dive in, please be cautious with the commands, some of them are disastrous. Some had EXIF metadata but were incorrectly named, some didn't have EXIF metadata, but I knew the time they were taken and most of them had filenames with random numbers based on the cameraīecause I didn't like the state of all my photos, I've decided to fix them. Not all of my photos had proper EXIF data.

However, this was not the case couple of years ago. I have thousands of photos in a perfect, organized state with correct EXIF metadata.
Exiftool mac copy filedatetime to datetimeoriginal how to#
What if your photos don't contain a correct EXIF metadata? Let me show how to batch fix and manipulate photos easily on Terminal Tips & tricks to batch edit EXIF metadata of photosĮXIF metadata contains useful information about the photo.
