Search code examples
photoexifproperties-file

File Date to Exif Data


I have a bunch of old folders containing photos from 2000s. For an unknown reason photos are empty of Exif data. But I want, at least, to keep the dates of each photo. So that they are in order when I import them in iCloud Photos.

Is there a software, or in command line way, or a script in any programming language, able to take each date inside 'file properties' and insert it in the photos' Exif data?

Thanks in advance.


Solution

  • You should be able to do this with exiftool. Make a backup of your files first, then try this on a single file:

    exiftool "-alldates<filecreatedate" ONEIMAGE.jpg
    

    Then check your "file properties" that you refer to and also check with:

    exiftool ONEIMAGE.jpg
    

    If that all looks correct, you can do all files in a directory like this:

    exiftool "-alldates<filecreatedate" DIRECTORYNAME