A newbie question. What is the proper syntax to use if I want to convert png files to jpg keeping all metadata and the filename the same?
ExifTool deals with metadata, so you must use some other utility to convert the image from PNG to JPG. After this, you can use ExifTool to copy as much of the metadata as possible:
exiftool -tagsfromfile source.png dest.jpg
- Phil
Thanks for your quick response!
I really just want to change the capture date to match the filename. I was able to complete the task successfully with my jpg's but not with my png's ... am I correct in assuming I need to convert to jpg's or does your magical tool work with png's as well and if so, what am I doing wrong. I used the command:
exiftool "-alldates<$filename" DIR
My files have naming convention as follows:
YYYY-MM-DD-12345.png
thanks!
It works with PNG's too, and your command should set the PNG CreateDate and ModifyDate tags. If you want to write other PNG date/time tags you'll have to copy FileName to them too.
- Phil
For some reason its not working. I've included a screen capture of the old and new filenames after running your program. It worked fine with the jpg's I had but with the png files it listed the date and time I converted them as the capture time .... what am I doing wrong?
I think that reading FAQ 24 (https://exiftool.org/faq.html#Q24) will help you to understand what is going on.
- Phil
1) I appreciate the support! Your software is awesome and has saved me hours of manual entry time
2) I read the FAQ and confirmed that the create date was indeed modified to the filename date
3) When I import the image into Photoshop, it appears that it sorts using the dates windows explorer uses (date/time values stored in the filesystem). I am assuming that's because Photoshop's algorithm uses the windows data rather than the true metadata. How do I correct this? ie: how do I get Photoshop to recognize the creation date set by your software. Again I did not have this issue with the jpg files. Just the png ones.
thanks again for dealing with my ignorance!
regards
In general, Photoshop support for PNG metadata is very poor, so I am not surprised it uses the filesystem FileModifyDate instead of the metadata for these files.
- Phil
Is there a way to change the date / time values used by the filesystem using the filename?
Yes. You set it just like any other date/time tag: "-filemodifydate<filename"
- Phil
thank you! Great software! Excellent support!