I want to import files from my library based on date taken
A number of files from my old iPhone appear to be missing the date taken but the value is in the file name, however the structure is not delimited
ios files.JPG
Can I use the exif tool to populate the Date Taken field from the filename when there are no delimiters? I have seen a couple of errors in the file date so don't want to use that.
Are these JPG files? (I assume so.)
If so, I would suggest this command to set DateTimeOriginal from the file name:
exiftool -if 'not $datetimeoriginal' "-datetimeoriginal<filename" -P DIR
This won't update files that already contain a DateTimeOriginal. I've also added -P to preserve the original filesystem date/time in case it is useful.
But if you want the filesystem date/times updated, do this:
exiftool "-filemodifydate<filename" DIR
- Phil