Problem with writing IPTC:TimeCreated

Started by Quant007, November 04, 2022, 07:32:01 AM

Previous topic - Next topic

Quant007

Hallo,
in an ARG-File i have the code:
-DateTimeOriginal>IPTC:DateCreated
-DateTimeOriginal>IPTC:TimeCreated
-d
"%H:%M:%S"
The tag IPTC:DateCreated was write korrekt. For the tag IPTC:TimeCreated there is a Error:
Warning: Invalid time format (use HH:MM:SS[+/-HH:MM]) in IPTC:TimeCreated (ValueConvInv)
If've tried also
-DateTimeOriginal>IPTC:TimeCreated
-d
%H:%M:%S
But it's always the same thing.
Any Ideas?
Best regards to all

Phil Harvey

You shouldn't work if you don't use the -d option.

Also, you shouldn't quote arguments in the argfile.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Quant007

Hallo Phill,
thx for your response.
I use the -d Option in the arg-file
-DateTimeOriginal>IPTC:TimeCreated
-d
%H:%M:%S
but the error appears

In the commandline
exiftool "-DateTimeOriginal>IPTC:TimeCreated" -d %H:%M:%S FILE works it fine

StarGeek

Works correctly here
C:\>type temp4a.txt
-DateTimeOriginal>IPTC:TimeCreated
-d
%H:%M:%S
C:\>exiftool -P -overwrite_original -@ temp4a.txt y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -iptc:all y:\!temp\Test4.jpg
[IPTC]          TimeCreated                    : 12:00:00-07:00
[IPTC]          ApplicationRecordVersion        : 4

Your first command fails on two points.  First, as Phil says, quotes aren't used in an ARG file (see FAQ #29).  Second, you are using the -d (-dateFormat) option to change the DateTimeOriginal to only have Hour:Minute:Second.  Because IPTC:DateCreated holds only Year:Month:Day, copying only Hour:Minute:Second into this tag will fail.

As I show above, removing the IPTC:DateCreated copy will allow this arg file to work.

Double check your ARG file to make sure there aren't any trailing spaces, as they are significant in an ARG file.

You should also remove the -d option from this or add a hashtag (see -n (--printConv) option) to the end of the tags you are copying from

-DateTimeOriginal#>IPTC:DateCreated
-DateTimeOriginal#>IPTC:TimeCreated
-d
%H:%M:%S
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

StarGeek

Quote from: Quant007 on November 04, 2022, 07:32:01 AMThe tag IPTC:DateCreated was write korrekt. For the tag IPTC:TimeCreated there is a Error:
Warning: Invalid time format (use HH:MM:SS[+/-HH:MM]) in IPTC:TimeCreated (ValueConvInv)

I just noticed that you said this.  This should not work and it does not work that way here.
C:\>type temp4a.txt
-DateTimeOriginal>IPTC:DateCreated
-DateTimeOriginal>IPTC:TimeCreated
-d
%H:%M:%S
C:\>exiftool -P -overwrite_original -@ temp4a.txt y:\!temp\Test4.jpg
Warning: Invalid date format (use YYYY:mm:dd) in IPTC:DateCreated (ValueConvInv) - y:/!temp/Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -iptc:all y:\!temp\Test4.jpg
[IPTC]          TimeCreated                    : 12:00:00-07:00
[IPTC]          ApplicationRecordVersion        : 4
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype