Author Topic: Batch Copy All Metadata to Same Name and Extension Files in Different Folder  (Read 3921 times)

Oskar

  • Jr. Member
  • **
  • Posts: 26
Hello! First of all, thank you for this marvelous tool I just discovered! I have no problem when using it on a file by file basis. I have troubles trying to copy all metadata from multiple files to other files with the same name from a different folder. Here is the folder structure:

Source files folder: c:\Temp\Valeb
Destination files folder: c:\Temp\Valem
Each folder contains an identical number of .mov files(from MVI_1640 to MVI_1689).
I tried to run the following command:

exiftool -tagsFromfile %dc:\Temp\Valeb\%fmov -r -all:all -overwrite_original -ext mov c:\Temp\Valem

but got the following error for all the files:

Warning: Error opening file - c:/Temp/Valem/c:\Temp\Valeb\MVI_1640
...
Warning: Error opening file - c:/Temp/Valem/c:\Temp\Valeb\MVI_1689


I guess there is an error in the way I name the destination files or folder. Could you please help me whith that?
Best regards,
Oskar.

 

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16703
    • ExifTool Home Page
Hi Oskar,

First, you should be aware that ExifTool only writes XMP and some date/time tags to MOV videos.

To fix your problem, try -tagsfromfile c:\Temp\Valeb\%f.mov

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Oskar

  • Jr. Member
  • **
  • Posts: 26
It works like a charm!

Thank you very much!

Oskar.

Oskar

  • Jr. Member
  • **
  • Posts: 26
Hello! Again a small problem:

If I type the commands in a command line window and run them one by one they run fine. If I put several commands in a batch file and try to run the batch I get errors. The batch file lines look like this:

exiftool -tagsFromfile d:\RAWs\%f.mov -r -all:all -overwrite_original -ext mov d:\dest\01
exiftool -tagsFromfile d:\RAWs\%f.mov -r -all:all -overwrite_original -ext mov d:\dest\02
exiftool -tagsFromfile d:\RAWs\%f.mov -r -all:all -overwrite_original -ext mov d:\dest\03

Could you please tell me what I am doing wrong?

Many thanks!

Oskar

  • Jr. Member
  • **
  • Posts: 26
Just found the answer:

In a Windows batch file double the %.

Thank you!!!!