Fix Dates Batch Workflow ExifToolGUI

Started by JEXIF, March 07, 2025, 03:05:52 AM

Previous topic - Next topic

JEXIF

Hello, I am using the ExifToolGUI version.

Basically I have two folders. The first folder is the original videos in 4K with the correct creation date. I then have a second folder with the same videos but converted to 1080p. They are the wrong date. The CreateDate field is the date of the conversion and not the date taken. Both folders have the same filenames for the videos.

Is there any workflow where I can extract the correct dates and update the converted files? A way to batch process this?



This is what I currently use to fix dates individually:

-CreateDate="2025:03:07 11:40:32"

I then fill all the other fields using:

"-QuickTime:CreateDate<CreateDate" "-QuickTime:ModifyDate<CreateDate" "-EXIF:CreateDate<CreateDate" "-EXIF:DateTimeOriginal<CreateDate" "-EXIF:ModifyDate<CreateDate" "-IPTC:TimeCreated<CreateDate" "-IPTC:DateCreated<CreateDate" "-XMP:DateTimeOriginal<CreateDate" "-XMP-exif:DateTimeOriginal<CreateDate" "-XMP-xmp:CreateDate<CreateDate" "-XMP-xmp:ModifyDate<CreateDate" "-XMP-pdf:CreationDate<CreateDate" "-XMP-photoshop:DateCreated<CreateDate" "-CreationTime<CreateDate" "-CreationDate<CreateDate" "-CreateDate<CreateDate" "-DigitalCreationDate<CreateDate" "-ModifyDate<CreateDate" "-DateTime<CreateDate" "-DateCreated<CreateDate" "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" "-FileAccessDate<CreateDate" "-TrackCreateDate<CreateDate" "-TrackModifyDate<CreateDate" "-MediaCreateDate<CreateDate" "-MediaModifyDate<CreateDate" "-FileCreateDate<CreateDate"

Thank you for any help

FrankB

If you are talking about ExifToolGui https://github.com/FrankBijnen/ExifToolGui/releases, there is no custom function available to do this.
It could be done using ExifTool Direct and predefined commands. But first you would have to know the best command to use.

@Stargeek: Any suggestions?

Frank

ywzc

In "regular" exiftool this can be done with this command:
exiftool -tagsfromfile 4K-FOLDER/%F -Time:All -FileModifyDate 1080p-FOLDER
Replace "4K-FOLDER" with the path to the original videos folder and "1080p-FOLDER" with the path to the converted videos folder.

JEXIF

#3
Thank you for the reply. I have been confused on how to use the Cmd version. I did create 2 folders without spaces and it does seem to work when I enter into Cmd (if you use spaces in the folder name it fails). This is what I used for now:

exiftool -tagsfromfile N:\4K/%F -Time:All -FileCreateDate N:\1080p

I am just checking that the dates are correct. It did create a 2nd version and renamed the old files. It seems to be working

JEXIF

#4
Just to follow from my last message. This command is working for me correctly and the dates are changing:

exiftool -tagsfromfile N:\4K/%F -Time:All -FileCreateDate N:\1080p


I do get the following warning but the dates are updating:

Warning: [minor] The ExtractEmbedded option may find more tags in the media data [x12] - N:\4K/IMG_8159.mov
Thank you for your help

FrankB

This answer assumes you are using a recent GUI version. V6.3.7.

In ExifToolGui you can use a predefined command. More info at: https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#p_etdirect

-tagsfromfile ..\1080K\%F -Time:All -FileCreateDate
Note the use of ..\1080K in stead of N:\1080K. I assume the '1080K' and '1080P' are both sub directories of the same directory.

1) Select the files in the 1080P directory.
2) Use the predefined command.
To show all output of ExifTool use the 'Show Log window' button first.

This is how it looks:
predefined.jpg


To get rid of the warning use this option:
minor.jpg

Frank

StarGeek

Quote from: FrankB on March 07, 2025, 04:34:55 AM@Stargeek: Any suggestions?

I'm assuming that this has been more or less taken care of, but here are my comments. (Edit: dang, turned out longer than I had planned, it seems too much like I like to hear myself to talk)

@ywzc has the best suggestion, as it copies any existing time based tags to the target. Maybe add FileModifyDate if desired
-tagsfromfile N:\4K/%F -Time:All -FileCreateDate -FileModifyDate

As for the large list of tags being written, I would remove/change a lot of those.

Remove FileAccessDate. You can't edit that, and it will change any time the file is touched anyway.

-CreateDate<CreateDate is useless and unneeded.

Write XMP-pdf:CreationDate only if the file is a PDF.

Remove the IPTC tags unless absolutely needed for the workflow. IPTC data is outdated. These include IPTC:TimeCreated, IPTC:DateCreated, and DigitalCreationDate. Note that the last one is useless unless you also write DigitalCreationTime.

Use shortcut tags. Using this
"-AllDates<CreateDate" "-XMP:AllDates<CreateDate"
covers CreateDate, DateTimeOriginal, and ModifyDate in the Quicktime, EXIF and XMP groups.

Use a wildcard for the Quicktime track based tags
"-Media*Date<CreateDate" "-Track*Date<CreateDate"

The only things left out are CreationDate and DateCreated. So the final command would look like this
"-AllDates<CreateDate" "-XMP:AllDates<CreateDate" "-Media*Date<CreateDate" "-Track*Date<CreateDate" "-CreationDate<CreateDate" "-DateCreated<CreateDate" "-FileModifyDate<CreateDate" "-FileCreateDate<CreateDate"

I do not include group names except for XMP:AllDates because exiftool knows where to best place the data and takes care of things behind the scenes.

But in my opinion, the best practice would be a user defined Shortcut tag. I give some of my example shortcuts in this post. The main ones that apply here would be three at the bottom of that post, VidTime, SysTime, and MyAllDates. This would allow writing and copying a large number of tags at the same time.
"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

FrankB

Quote from: StarGeek on March 07, 2025, 10:25:51 AM
Quote from: FrankB on March 07, 2025, 04:34:55 AM@Stargeek: Any suggestions?

I'm assuming that this has been more or less taken care of, but here are my comments.

Thanks. Useful as always.

JEXIF

#8
Thanks for your help with this. The command you use in Cmd has been working for me:
exiftool -tagsfromfile N:\4K/%F -Time:All -FileCreateDate N:\1080p

I will go through all the points mentioned and check this. Thank you for taking the time to go through this.


May I also just ask how I would use a similar Cmd code to copy the date and GPS from different formats?

I have a folder of JPG files where I have edited the date and GPS in Lightroom (and saved the metadata to the file) and then I have another folder with the same files (and filenames) but in RAW (.ARW). Is there a way I can copy all the information from the JPG files to the ARW files that have the same name?

Thank you for any help you can provide.


StarGeek

Quote from: JEXIF on March 10, 2025, 05:58:45 AMI have a folder of JPG files where I have edited the date and GPS in Lightroom (and saved the metadata to the file) and then I have another folder with the same files (and filenames) but in RAW (.ARW). Is there a way I can copy all the information from the JPG files to the ARW files that have the same name?

The command is basically the same. You simply replace -time:all -FileCreateDate with the other tags you want to copy.

You also have to change the format string after the -TagsFromFile (see the -w (-TextOut) option for details on the % variables.

On the command line, it would be something like this (note lowercase %f)
exiftool -ext arw -tagsfromfile /path/to/jpegs/%f.jpg "-GPS*" /path/to/ARWfiles/

"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

FrankB

#10
In Gui:

1. Select all Arw files
2. Issue this ExifTool Direct command
-tagsfromfile "c:\sony\jpg\%f.jpg" "-gps*"
Frank

sony.jpg

FrankB

Suppose you dont want to do many files at once, but would like to 'see what you're doing'. You could use the 'Show diff metadata' function of GUI. Not only can you see the differences, but also merge them.
For this case you would have to modify the 'Tag selection' and the 'Matching right file:'

Online Docs:
https://github.com/FrankBijnen/ExifToolGui/blob/main/Docs/ExifToolGUI_V6.md#show_diff_metadata

Screenshot:
diff_merge.jpg

Frank