As long as you have the filename set as you mention, the command you want to use is
exiftool "-PNG:CreationTime<Filename" FileOrDir
As @cmason mentions, PNG doesn't support the EXIF standard. Exiftool and Exiv2 do have a workaround, but it isn't widely supported. So EXIF tags won't be set by other programs unless you set them yourself with Exiftool or Exiv2.
Date Taken is a Windows property, not a metadata tag, and in the case of PNG files, it is set from the PNG:CreationTime
tag.
To set the Windows Date Take property in a PNG file to something else, you can use this command, replacing the time stamp appropriately:
exiftool -PNG:CreationTime="2017:01:10 10:45:01" FileOrDir
Edit: Just some notes on why your previous commands didn't work.
exiftool "-creationTime=-timecreated" *
The equal sign assigns values. So in this case, you're assign the CreationTime
tag the value of -timecreated
. If you wanted to copy the TimeCreated
tag, you would have first had to drop the dash in front of -timecreated
(only used at the very beginning to indicate a tag operation) and then used the tag copy operation (less/greater than symbol <
or >
) e.g. -creationTime<timecreated
or -TimeCreated>CreationTime
.
exiftool "-creationTime<EXIF:DateCreated" *
and exiftool.exe "-DateTimeOriginal>FileModifyDate" *
Properly formatted, but as mentioned, PNGs doesn't support EXIF tags (DateTimeCreated is normally an EXIF tag though it can also be an XMP tag). There should have been a "No writable tags" error message.
exiftool "-creationTime=now" *
"Now" is an Exiftool pseudo-tag for the current date/time. But the equal sign is setting CreationTime
to the value now
, not the DateTime of now. The proper command would have been "-CreationTime<Now"
.
exiftool -v "-FileModifyDate>AllDates" *
Properly formatted, but again it's a problem with PNGs lack of support for EXIF data. AllDates
is an Exiftool shortcut for three EXIF tags: EXIF:DateTimeOriginal, EXIF:ModifyDate, and EXIF:CreateDate.
Edit 2: At some point there appears to have been a change in the way Windows reads PNG metadata. It seems to stop reading at the PNG IDAT chunk even if there is data beyond it, which is allowed by the spec. PNG:CreationTime
may not show up properly when written by exiftool. See this Exiftool Forum post.
Edit 3: In exiftool ver 10.71, Phil Harvey changed the way exiftool wrote the PNG:CreationTime
tag to follow the PNG RFC-1123 format (Link Link). Windows doesn't seem to be able to read that format. This change as been reverted as of ver 11.13 with an option to enforce the PNG spec with the -api StrictDate
option.