process from one path with copy on other path

Started by msdobrescu, March 20, 2013, 03:05:39 PM

Previous topic - Next topic

msdobrescu

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.

Phil Harvey

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

msdobrescu

Actually, it creates a file having the name of the -o argument, and tries that to tag.

Phil Harvey

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

msdobrescu

A-ha, thanks. Without '/' in the name, I should use -directory option.
Why does it set the filename to the Title tag?

Phil Harvey

Sorry, but I have no idea what you just said.

1) There is no -directory option

2) Title tag?

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

msdobrescu

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

Phil Harvey

Hi Mike,

Yes, writing the Directory tag is another way to specify the output directory.  This is explained in more detail here.  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
...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 ($).