As long as you have the filename set as you mention, the command you want to use is
exiftool "-PNG:CreationTime<Filename" FileOrDir
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. This is the only embedded metadata tag that Windows will read in a PNG file.
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"
. See Exiftool Common Mistake #5
exiftool "-creationTime<EXIF:DateCreated" *
and exiftool.exe "-DateTimeOriginal>FileModifyDate" *
At the original time posted, EXIF data in PNG files was non-standard, with ImageMagick, Exiv2, and exiftool using a work around to embed the data. An official location for EXIF data was added to the standard in 2017. These commands are properly formatted, but EXIF data in PNG files is rare unless specifically set by the user. There should have been a "No writable tags" error message. Note that while the second command works, most exiftool example show copying from the tag on the right into the tag on the left. The tag copy will follow the direction of the Less/Greater Than sign.
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 at the time of the original post. AllDates
is an Exiftool shortcut for three EXIF tags: EXIF:DateTimeOriginal
, EXIF:ModifyDate
, and EXIF:CreateDate
.