Help please... From filename to exif datecreated

Started by pacomadrid_6, December 04, 2014, 06:04:30 AM

Previous topic - Next topic

pacomadrid_6

Hi folks! I am a new user to this incredibly powerful tool... After much reading, investigating and trying, I decided to ask for help to advanced users to see if I can sort out my issue: I digitized all the pictures of my family and I have got now a directory with aprox 9.000 pictures. I patiently renamed all files in windows with this format : "yyyy-mm-dd hh-mm-ss coment.jpg" and I would like to use the file name "yyyy-mm-dd hh-mm-ss" to write the exif field "datecreated" so that the pictures I scanned are showing the right date I used in the filename and not the exif datecreated field my scanner included.

For example, I scanned in November a pict of my kid´s birthday and named it "2008-12-11 12-00-00 Birthday.jpg" but the exifdatecreated shows "2014-11-12 21-15-23" wich is the date I scanned it.

What would be the instruction for chaging the exif date with the file name date?

Your help is very much appreciatted!

Regards, Paco

Phil Harvey

Hi Paco,

First you must figure out the name of the ExifTool tag that you want to write.  I suspect that you want the EXIF:DateTimeOriginal tag (which should be when the picture was actually taken).  If so, then the command is:

exiftool "-exif:datetimeoriginal<filename" DIR

where DIR is the name of a directory containing the images.   Add -r to the command to also process subdirectories.

See the EXIF tags documentation for a complete list of available EXIF tags.

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

pacomadrid_6

Thanks Phil!

You are right, tag is EXIF:DateTimeOriginal. That is close to what I am trying to do, great thanks for your help. Please let me take one more minute from you:

The command is close, but my problem is that the filenames of my 9K picts are following this naming template: "YYYY-MM-DD HH-MM-SS followed by a descriptive, and then the extension. Example:

"2014-11-01 12-15-24 Birthday at the park.jpg"
"1984-02-26 01-25-14 Dinner at Italian.jpg"

How can I tell Exiftool to use only the YYYY-MM-DD HH-MM-SS characters of the filename and write only that in EXIF:DateTimeOriginal?

Thank you very much for your support with this "mistery"... :)

KR, Paco


StarGeek

Quote from: pacomadrid_6 on December 04, 2014, 05:56:58 PM
How can I tell Exiftool to use only the YYYY-MM-DD HH-MM-SS characters of the filename and write only that in EXIF:DateTimeOriginal?

You don't need to, ExifTool will figure it out.  See FAQ 5.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

pacomadrid_6

Thank you Folks. Problem solved!

Now the cloud service I use is categorizing the pictures right by date they were created and not by the date they were scanned.

Gracias and Merry Xmas.