Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exiftool command in README not working #360

Open
reteptilian opened this issue Dec 11, 2024 · 0 comments
Open

exiftool command in README not working #360

reteptilian opened this issue Dec 11, 2024 · 0 comments

Comments

@reteptilian
Copy link

In

exiftool -overwrite_original -r -if 'not defined DateTimeOriginal' -P "-AllDates<FileModifyDate" "your/output/folder/ALL_PHOTOS/"

The DateTimeOriginal in the "-if" snippet needs to be prefixed with $.

For example:

# This file doesn't have DateTimeOriginal. It has a FileModifyDate
$ exiftool -DateTimeOriginal -FileModifyDate ./ALL_PHOTOS/IMG_6872.MOV
File Modification Date/Time     : 2016:11:24 14:29:42-08:00

# Try the command in the README (without -r). Note the "failed condition" error message.
$ exiftool -overwrite_original  -if 'not defined DateTimeOriginal' -P "-AllDates<FileModifyDate" ./ALL_PHOTOS/IMG_6872.MOV
    1 files failed condition

# Still no DateTimeOriginal
esbensen@newxps:/data2/photos/organized$ exiftool -DateTimeOriginal -FileModifyDate ./ALL_PHOTOS/IMG_6872.MOV
File Modification Date/Time     : 2016:11:24 14:29:42-08:00

# Try again with $DateTimeOriginal
$ exiftool -overwrite_original  -if 'not defined $DateTimeOriginal' -P "-AllDates<FileModifyDate" ./ALL_PHOTOS/IMG_6872.MOV
    1 image files updated

# It worked
$ exiftool -DateTimeOriginal -FileModifyDate ./ALL_PHOTOS/IMG_6872.MOV
Date/Time Original              : 2016:11:24 14:29:42-08:00
File Modification Date/Time     : 2016:11:24 14:29:42-08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant