ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ComfortableMedia6 on August 10, 2024, 05:48:10 AM

Title: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: ComfortableMedia6 on August 10, 2024, 05:48:10 AM
Hello, I've got a folder of photo and video from Google Photos Takeout Helper that I'm trying to organise.

I want to copy the Windows 'Date Modified' columns to all other date columns so that my Android phone sorts them correctly. Because currently, if the 'Date Taken' isn't present, then it uses 'Date Created', rather than 'Date Modified'.

So AFAIK, I need to use ExifTool to copy the 'filemodifydate' to 'alldates' - is that right?

I've tried the following command, but it not working as expected, it's making the 'Date Modified' column to today's date for some reason?
exiftool -p -q -q "-alldates<filemodifydate" "\path\to\folder\"
Many thanks!
Title: Re: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: Phil Harvey on August 10, 2024, 09:08:01 AM
AllDates is a shortcut for DateTimeOriginal, CreateDate and ModifyDate, which are the common EXIF date/time tags.  I don't know what Windows uses for 'Date Modified'.

- Phil
Title: Re: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: wywh on August 10, 2024, 09:21:02 AM
-AllDates is a Shortcut for the three most commonly used image timestamps 'DateTimeOriginal', 'CreateDate' and 'ModifyDate'.

By coincidence it works for movie 'UserData:DateTimeOriginal' that some non-Apple apps might use.

But it is not so good in Apple's movies because it does not touch 'Keys:CreationDate' that Apple's apps prefer.

Sadly movie metadata is still a wild west so you must check what tags work for your apps.

...there is much confusion about -AllDates. Should there be some new shortcut that automagically reads the user's mind and copies the needed tags for images and movies in all platforms  ???

- Matti
Title: Re: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: StarGeek on August 10, 2024, 11:02:37 AM
Quote from: ComfortableMedia6 on August 10, 2024, 05:48:10 AMI've tried the following command, but it not working as expected, it's making the 'Date Modified' column to today's date for some reason?
exiftool -p -q -q "-alldates<filemodifydate" "\path\to\folder\"

This command edits the original data embedded in the file. Hopefully, it was the same as the FileModifyDate so you didn't overwrite the original time stamp.

The command you want to use is
exiftool -fast5 "-FileCreateDate<FileModifyDate" /path/to/files/

Or to copy from the embedded time stamps
exiftool -api QuickTimeUTC "-FileCreateDate<CreateDate" "-FileCreateDate<DateTimeOriginal" /path/to/files/
Title: Re: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: Phil Harvey on August 10, 2024, 02:03:06 PM
Quote from: ComfortableMedia6 on August 10, 2024, 05:48:10 AMexiftool -p -q -q "-alldates<filemodifydate" "\path\to\folder\"

I just noticed:  I think you meant -P and not -p.

- Phil
Title: Re: Copying 'filemodifydate' to 'alldates' not working as expected
Post by: StarGeek on August 10, 2024, 06:48:29 PM
Ah, I missed that as well. Lowercase p is the -p (-printFormat) option (https://exiftool.org/exiftool_pod.html#p-FMTFILE-or-STR--printFormat).  Uppercase is the -P (-preserve) option (https://exiftool.org/exiftool_pod.html#P--preserve).

A common misunderstanding is that the AllDates tag does not change "All" the dates, just the most important and common ones. So we jumped to the wrong conclusion without thoroughly examining the command.