Can I use another tag to output to file than ">"

Started by BenHayat, December 01, 2016, 08:32:23 PM

Previous topic - Next topic

BenHayat

Hi;

I'm trying to use exifTool with another software (server side) to create a simple file for some of the image attributes like the following sample.

exiftool -filename C:\at\a.jpg > C:\at\out.txt

This command works perfectly in command line using ">" letter to indicate to output or create out.txt.
However, the software that I'm using which allows executing another program, does not like the ">", so it ignores the whole command.

My question is, is there another way to tell exifTool to output (i.e. -output) rather than using ">" letter?
Thank you in advance.

..Ben
Software Architect & Engineer

Stephen Marsh

EDIT: Scrub that idea, I was thinking tags to tags, not tags to file!

Phil Harvey

This command:

exiftool -filename -w txt c:/at/a.jpg

will write a file called "a.txt".

If you want to write a file with a specific name with all output from the command, it is a bit trickier but the -w option documentation explains how to do this:

exiftool -filename -w+! %0fc:/at/out.txt c:/at/a.jpg

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

BenHayat

Thank you very much Phil;

I had used that simple example just as a point of reference. The real command than I need to use, is the one that reads all the images in a folder and then creates a single file output like the following
exiftool -filename -gpslatitude -gpslongitude -T -n C:\at > C:\at\out.txt

Is it possible to do so with -w option?
Thanks!
Software Architect & Engineer

Phil Harvey

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

BenHayat

Quote from: Phil Harvey on December 01, 2016, 09:30:49 PM
My second example does just that.

- Phil

Thank you Phil;
I just tested with my program and works. Unfortunately -w does not work with -csv option.
Software Architect & Engineer