Writing CreateDate tag from file name

Started by Snail, May 31, 2016, 11:16:22 AM

Previous topic - Next topic

Snail

Hi All,
I'm new to ExifTool and this forum,so I apologize for the silly question.
I have a set of about 600 tiff images that do not have the CreateDate EXIF field filled out and am not able to edit it in any ways (I tried with several tool including Exiftool and Windows to no avail.
I also tried using the following Perl script (found on another forum), but no luck either:

exiftool '-CreateDate<${FileName;use Date::Manip;
                      Date_Init("DateFormat=non-US");
                      /on (.*?_.*?[AP]M)/;$_=$1;
                      y/./:/;$_=UnixDate($_,"%Y-%m-%d %T")
                      }' ./*on\ *_*[PA]M*.tiff

What I need: batch fill in the CreateDate Exif tag from the file name date and time (as per the attached samples) for the 600 photos.

Do you have any tips or suggestions?

Thanks in avance for any feedback you may provide.

Best Regards

Snail
Windows 10 - Exiftool 10.19

Snail

Hi, sorry
I'm attaching two missing images.

Snail
Windows 10 - Exiftool 10.19

StarGeek

In the image I checked, the problem seems to be that the Makernotes are unrecognized and/or corrupt.  I'd wait until someone else takes a look at the files but if you don't need the Makernotes, they can be removed with
Exiftool -Makernotes=

Then, you can just use
Exiftool "-createdate<filename"
* 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).

Phil Harvey

The minor error is because the maker notes are unrecognized, so you must add -m to the command to ignore this if you want to write to the file:

exiftool "-createdate<filename" -m FILE

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

Snail

Hey Guys, you're really awesome!!!

I just processed the 600 some images and it just went great.

I really appreciate your support.

Snail
Windows 10 - Exiftool 10.19