Batch copy file date to image created date

Started by Phil707, November 10, 2022, 09:36:17 AM

Previous topic - Next topic

Phil707

I've imported my LR catalogue into C1 - unfortunately a couple 100 old pictures don't have 'date created' info in EXIF.
(LR, Bridge etc seem to be able to deal with the file date alone...but C1 leaves all these pictures at the beginning of the folder)

Is there a way I can copy the Finder file date to the EXIF 'file created' info...so that C1 can sort those pictures accordingly?

And is it possible to do this for a while folder...cause of course for single pictures I can manually set a 'date created'...but not for a couple hundred pictures  :-\ 

Thank you!

Phil Harvey

Assuming you are on Windows or Mac, you can use this command to copy the file creation date to EXIF:CreateDate

exiftool "-createdate<filecreatedate" -P DIR

The -P is necessary to avoid changing the file's creation date when writing.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil707

Yesss, I just found it (after 3h hahaa).  Awesome!  Thank you so much!

But: it won't work for the MOV files...

Is there a way too?

StarGeek

In what way is it not working for MOV files?

Most video time stamps are supposed to be in UTC.  Try adding the -api QuickTimeUTC option to adjust to UTC.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil707

#4
Well, it just doesnt show the DATE in Capture One. The file seems to have only a file date, but not a date of when shot in the EXIF.

I tried adding QuickTimeUTC now - but it still is the same. And says:

~ % exiftool '-alldates<filecreatedate' -api QuickTimeUTC /Volumes/SSD\ Raid/PHOTOS\ SSD/_TiER/mov/IMG_8992.MOV
Warning: [minor] The ExtractEmbedded option may find more tags in the media data - /Volumes/SSD Raid/PHOTOS SSD/_TiER/mov/IMG_8992.MOV
    1 image files updated

StarGeek

This is FAQ #3.

Find a file that shows the date in Capture One or set the date in Capture One if possible, then run the command in FAQ #3 to figure out what tag that Capture One is reading.  Take into account that most video time stamps are in UTC so you probably have to adjust for the time zone.  Adding the -api QuickTimeUTC option to the FAQ #3 command will adjust the times to your local time zone.

Or... upon re-reading, if Capture One isn't showing any date for a video, then it is entirely possible that it doesn't read video time stamps and if that is the case, nothing you can do can make it happen.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil707

Just checked that. And yes, you might be right there indeed. No video has a date.
Also for example PNG often don't. But If I convert them to jpg I can give them a date with the ExifTool.

Anyway....I fear the only meaningful and relaible way to go in Capture One will be to rename for all pictures with the date as a name before import. And then don't sort by date but by name.
I found a tool to do that - ExifRenamer.

But thank you very much!

StarGeek

Quote from: Phil707 on November 10, 2022, 03:22:50 PMAlso for example PNG often don't. But If I convert them to jpg I can give them a date with the ExifTool.

PNG metadata support is lacking in a lot of software.  And it doesn't help that actual EXIF data in PNG files wasn't there from the start.  I was about to say that such support was relatively recent, but since it was added mid-2017, it's been over 5 years, so I guess not that recent anymore.

You might consider converting PNGs into TIFs as TIF is a lossless file and is usually well supported.  Most RAW file types are based upon TIF.  Converting to a jpg is a lossy conversion, losing some of the image quality in doing so.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wywh

Quote from: Phil707 on November 10, 2022, 03:22:50 PMPNG often don't. But If I convert them to jpg I can give them a date with the ExifTool.

I recently added 'ExifIFD:DateTimeOriginal' to all my .png images. At least newer macOS apps support it.

- Matti

StarGeek

Quote from: wywh on November 11, 2022, 02:21:02 AMI recently added 'ExifIFD:DateTimeOriginal' to all my .png images. At least newer macOS apps support it.

That's good to hear.  Sadly not the case on any Windows programs I've tested, though I don't have access to commercial programs beyond the trial periods and it's been a while since I've checked.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype