Trying to change time only; no success

Started by JayEmBee, March 30, 2023, 10:06:14 AM

Previous topic - Next topic

JayEmBee

Greetings forum moderators,

I am trying to change the time only with the following command:
exiftool "-CreateDate<${CreateDate;s/ .*/ 00:00:00/g}" temp

I would like to remove all references to time in the file.
I get Warning: No writable tags set from temp error

exiftool -a -G1 -s temp results in:

[ExifIFD]      DateTimeOriginal                : 2016:09:18 21:45:15
[ExifIFD]      CreateDate                      : 2016:09:18 21:45:15

I would like it to read:

[ExifIFD]      DateTimeOriginal                : 2016:09:18 00:00:00
[ExifIFD]      CreateDate                      : 2016:09:18 00:00:00

Thank you advance

Phil Harvey

Your command should work for CreateDate if you are in a Windows cmd shell.  For other shells you need to use single quotes.

- 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 ($).

StarGeek

Alternatively
C:\>exiftool -G1 -a -s -alldates y:\!temp\Test4.jpg
[ExifIFD]      DateTimeOriginal                : 2023:03:30 11:13:50
[ExifIFD]      CreateDate                      : 2023:03:30 11:13:50
[IFD0]          ModifyDate                      : 2023:03:30 11:13:50

C:\>exiftool -P -overwrite_original -d "%Y:%m:%d 00:00:00" -TagsFromFile @ -AllDates y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -alldates y:\!temp\Test4.jpg
[ExifIFD]      DateTimeOriginal                : 2023:03:30 00:00:00
[ExifIFD]      CreateDate                      : 2023:03:30 00:00:00
[IFD0]          ModifyDate                      : 2023:03:30 00:00:00
"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