ExifTool Forum

ExifTool => Newbies => Topic started by: Laffer on May 20, 2021, 04:41:44 AM

Title: FileCreate Date from Filename, no success
Post by: Laffer on May 20, 2021, 04:41:44 AM
I tried my best with the forum and the -d formats, but had no success.

I used

exiftool "-datetimeoriginal<filename" -d "%Y-%M-%D_%H.%M.%S" "2009-12-11 19.06.24 JASMIN_0007.mp4"


But no success. the file creation date is not changed to 2009-12-11 19:06:24 but to TODAY()

Any suggestion?
Title: Re: FileCreate Date from Filename, no success
Post by: StarGeek on May 20, 2021, 11:49:16 AM
See FAQ #5 (https://exiftool.org/faq.html#Q5), specifically the 3rd paragraph (starts "Having said this") and the example that follows it.

Your filename contains all the time data in the right order.  Drop the -d (-dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat), it's not needed, and copy the filename directly to the tag you want.

Also, the DateTimeOriginal tag is not the FileCreateDate tag.  If you want to use the OS file system timestamps, copy to FileCreateDate/FileModifyDate.

See FAQ #3 (https://exiftool.org/faq.html#Q3) for instructions on figuring out tag names.