Performing time shift based on `FileModifyDate` tag value

Started by krash002, March 23, 2025, 05:28:03 PM

Previous topic - Next topic

krash002

I have lots of m4a files in a directory and want to rename them all based on their CreateDate tag values, but I also need to perform time shift by the value indicated in FileModifyDate tag at the end (for me it can be either +02:00 or +03:00), how can I write that conditional logic to determine hours shift value? What I currently have is the following:

exiftool -d "%Y-%m-%d %H-%M-%S%%-c.%%e" -globaltimeshift "0:0:0 2:0:0" -ext m4a "-filename<CreateDate" FILEPATH

Which shifts by 2, even if FileModifyDate has 3 at the end...

Thanks.

StarGeek

Use the -api QuickTimeUTC option instead. That will shift the video UTC time stamps to local time based upon the computer's time zone.

exiftool -d "%Y-%m-%d %H-%M-%S%%-c.%%e" -ext m4a -api QuickTimeUTC "-filename<CreateDate" /path/to/files/
"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