helper function ShiftTime

Started by MB, March 24, 2023, 04:56:40 PM

Previous topic - Next topic

MB

Hello Phil,
the ExifTool-Application-Documentation shows an example for the helper function ShiftTime:
exiftool ‐p '${createdate;ShiftTime("‐1:0:0 0")}' a.jpg

I want to shift the Exif:DateTimeOriginal of a jpg-file by +1 hour.
exiftool ‐p '${DateTimeOriginal;ShiftTime("0:0:0 1:0:0")}' M:\Test\IMGP2623.jpg

The result is the following warning:
C:\Users\marti>exiftool ‐p '${DateTimeOriginal;ShiftTime("0:0:0 1:0:0")}' M:\Test\IMGP2623.jpg
'2022:11:12 19:55:39'
Warning: syntax error for 'DateTimeOriginal' - M:/Test/IMGP2623.jpg

I have searched several application-documents and the ExifTool-Forum for hints on the error cause in vain.
I have installed the stand-alone Windows Executable 12.57 on a Windows 11-System.
Kind regards
Martin

Phil Harvey

Hi Martin,

I can't see where that ExifTool error is produced.

1. If you are in a Windows cmd shell you need to swap all the double and single quotes.

2. Be sure your arguments begin with a normal dash, and not some other type of hypen.

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