Author Topic: Toolrefugee looking for batching help  (Read 71 times)

Jhnb

  • Newbie
  • *
  • Posts: 3
Toolrefugee looking for batching help
« on: August 02, 2020, 10:09:12 AM »
Hi all,

Toolrefugee here, I tried to soak up as much of the forum and documentation as I can, but can't figure out my seemingly simple issue. (I think)

I've been using exiftool for some time now and just called the command on a file to file base which was fine. Copy over all metadata to a processed file (processing removed all metadata), to restore it entirely on the new file.

Now I have a big batch of files and file by file calling my current command turns out to be quite slow. I red the improve performance section and some other posts, but I have trouble making it work. It turns out it's hard for me to digest the docs and command-line options.

I use python on windows to run things.
My current command is:
Code: [Select]
exiftool.exe -TagsFromFile D:\data_raw\401.jpg -all:all -overwrite_original D:\data_processed\401.jpg
I'm looking for a way to batch the 2 directories, so that data_raw is the source metadata file and in the processed data directory the file with the same name, gets the original data restored to it.

Any guidance, examples etc is appreciated!!

Thanks!
-Johan

Jhnb

  • Newbie
  • *
  • Posts: 3
Re: Toolrefugee looking for batching help
« Reply #1 on: August 02, 2020, 10:38:52 AM »
Hmm, I have it working on the commandline but not from a batch file.
I have to following code:

Code: [Select]
exiftool.exe -TagsFromFile D:\data_raw\%F -overwrite_original -all:all D:\data_processed\

So it runs from the windows commandline directly, but not from within a batchfile which I call from the commandline. Is it because of %F ?

Thanks!

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3795
Re: Toolrefugee looking for batching help
« Reply #2 on: August 02, 2020, 10:42:47 AM »
See FAQ #27 (or my .sig below)
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Jhnb

  • Newbie
  • *
  • Posts: 3
Re: Toolrefugee looking for batching help
« Reply #3 on: August 02, 2020, 10:56:16 AM »
Haha ok thanks, one of those things eh!  ;)
Appreciate the help!

Cheers,
-Johan