File metadata copied to all files in directory

Started by JoshData, June 10, 2023, 04:10:15 AM

Previous topic - Next topic

JoshData

Hey all!

Firstly, thanks for an epic tool! It's helping me organise all my files and I've been busy using Google to figure out what I need to do.....but stuck on this last step!

I have old .3gp videos, which I have converted to .mp4 with ffmpeg

Now I'm using ExifTool to copy the metadata from the original .3gp to the new .mp4. I've figured out the batch line to use but when I run it, it doesn't seem to define each files metadata but instead, takes the meta from the first file and copies that across all the other videos.

exiftool -r -tagsFromFile *.3gp -extractEmbedded -all:all -FileModifyDate -overwrite_original -FileCreateDate -overwrite_original *.mp4

Might be easier to write it out

I have a folder with the following:

video1.3gp
video1.mp4
video2.3gp
video2.mp4

Video 1 and 2 .3gp have unique Creation and Modified dates. I want them copied to their respective .mp4 files.

When I run the code above, it seems to copy the meta from the video1.3gp, replace video1.mp4 (great) BUT then replace video2.3gp and video2.mp4 with that meta as well (not good), despite video2 having different meta.

Any help, greatly appreciated! I feel like I'm just a couple of changes away from getting the right rule!

Thanks,

Josh

Phil Harvey

Hi Josh,

The -tagsfromfile option doesn't take wildcards.  Try this:

exiftool -r -tagsFromFile %d%f.3gp -all:all -FileModifyDate -filecreatedate -overwrite_original -ext mp4 DIR

1. "%d%f" represents the directory and file name of the original file

2. You you really need -extract_embedded?  ExifTool won't write embedded tags.

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

JoshData

Works beautifully! No need for extract embedded either.

Thanks, Phil!  8)