Modify datacreate and timecreate from filename

Started by Jackalope, February 17, 2012, 09:58:09 AM

Previous topic - Next topic

Jackalope

Hello

first of all, thanks for WONDERFUL command line suites...

then

i've a file named IMG_20120120_104446.jpg with wrong exif data

is it possible to change datacreate and timecreate by using filename?

thanks
regards

Simon

Phil Harvey

Hi Simon,

Surprisingly, this is not an uncommon request.  Try this:

exiftool "-datetimeoriginal<filename" DIR

- 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 ($).

Jackalope


Phil Harvey

Hi Simon,

Great.  Glad to hear it.

I've added a note about this to FAQ number 5 since it has come up a few times in the past.  Also, I mentioned the AllDates tag, which may also be convenient in cases like this.

- 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 ($).