ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: msdobrescu on March 20, 2013, 03:05:39 PM

Title: process from one path with copy on other path
Post by: msdobrescu on March 20, 2013, 03:05:39 PM
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.
Title: Re: process from one path with copy on other path
Post by: Phil Harvey on March 20, 2013, 03:46:04 PM
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
Title: Re: process from one path with copy on other path
Post by: msdobrescu on March 20, 2013, 04:05:03 PM
Actually, it creates a file having the name of the -o argument, and tries that to tag.
Title: Re: process from one path with copy on other path
Post by: Phil Harvey on March 20, 2013, 04:12:58 PM
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
Title: Re: process from one path with copy on other path
Post by: msdobrescu on March 20, 2013, 04:26:15 PM
A-ha, thanks. Without '/' in the name, I should use -directory option.
Why does it set the filename to the Title tag?
Title: Re: process from one path with copy on other path
Post by: Phil Harvey on March 20, 2013, 07:42:50 PM
Sorry, but I have no idea what you just said.

1) There is no -directory option

2) Title tag?

- Phil
Title: Re: process from one path with copy on other path
Post by: msdobrescu on March 21, 2013, 02:29:33 AM
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
Title: Re: process from one path with copy on other path
Post by: Phil Harvey on March 21, 2013, 07:20:20 AM
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