Hello,
Is there a way to process the jpg files from a directory using a batch command (bat), when the directory is not the same with the location of the bat file or exiftool, with copy to a new directory, ideally giving relative paths?
For example, the jpegs are on m:\images, the bat on m:\batches, the new directory with the processed files to be created on "m:\processed images".
I would have tried exiftool -TAG= -o "m:\processed images" -ext jpg "m:\images"
Obviously, there is something I misunderstood about the above. Could it be the wrong order or params combination?
Thanks.
I don't see anything wrong with your command (other than you need to specify a real tag name instead of "TAG").
It should work.
- Phil
Actually, it creates a file having the name of the -o argument, and tries that to tag.
Ah. The output directory didn't already exist.
In this case, you must end the directory name with a slash (or backslash) so that ExifTool knows this is a directory and not a file that you want to create.
If the directory already exists, you don't need the terminating slash.
From the application documentation for the -o option:
The output file is taken to be a directory name if it already
exists as a directory or if the name ends with '/'. Output
directories are created if necessary. Existing files will not be
overwritten. [...]
- Phil
A-ha, thanks. Without '/' in the name, I should use -directory option.
Why does it set the filename to the Title tag?
Sorry, but I have no idea what you just said.
1) There is no -directory option
2) Title tag?
- Phil
Hi, sorry for the delay, it's been night on this side of the planet and I was sleeping, happy with my job done by exiftool :)
-directory as in:
Quoteexiftool -directory=%e dir
Move all files from directory dir into directories named by the original file extensions.
It does the job too.
Title refers to Xmp:Title. Sorry for the ambiguity.
Regards,
Mike
Hi Mike,
Yes, writing the Directory tag is another way to specify the output directory. This is explained in more detail here (https://exiftool.org/filename.html). In particular, example number 10 explains the trailing slash that we discussed, and example 11 explains the interaction between the Directory tag and the -o option.
- Phil