I'm using this method to read the modified date of a file.
/usr/bin/exiftool -s3 -subject -headline -usercomment -filemodifydate /Volumes/StudioD/Users/StudioD/Pictures/CompletedFolders/TM_WK44_PSD/TM15_2.psd
I then collect the data in applescript and set the 4th paragraph to the date string. Thus = 2014:06:20 12:11:10+01:00
I am then trying to write that data back to a png or PSD file like this.
/usr/bin/exiftool -a -api PNGEarlyXMP -overwrite_original_in_place -filemodifydate=2014:06:23 12:37:45 /Volumes/StudioD/Users/StudioD/Pictures/CompletedFolders/TM_WK44_PSD/TM_2.psd
but this comes up with an error
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileModifyDate (PrintConvInv)
Nothing to do.
I believe its in the correct format?
You need quotes around arguments containing a space: -filemodifydate="2014:06:23 12:37:45"
Also, the -a option has no effect when writing.
- Phil
Still getting the error?
/usr/bin/exiftool -api PNGEarlyXMP -overwrite_original_in_place -filemodifydate="2014:06:20 12:11:10+01:00" /Volumes/Images/2013-2014/WK44/TM_WK44_PSD/TM_2.png
or
/usr/bin/exiftool -api PNGEarlyXMP -overwrite_original_in_place -filemodifydate="2014:06:20 12:11:10" /Volumes/Images/2013-2014/WK44/TM_WK44_PSD/TM_2.png
I get the error: Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:FileModifyDate (PrintConvInv)
Nothing to do.
Should i be including the +01:00?? Although it currently makes no difference to the outcome.
Your quotes look funny. Be sure to use standard ASCII double quotation marks, not the fancy 66/99 quotes.
- Phil
Ah!, well spotted!
I was typing my code in on textedit in plain text mode, thinking that would be ok, not for that character!
Thankyou very much all working fine now!