ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BenHayat on December 01, 2016, 08:32:23 PM

Title: Can I use another tag to output to file than ">"
Post by: BenHayat on December 01, 2016, 08:32:23 PM
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
Title: Re: Can I use another tag to output to file than ">"
Post by: Stephen Marsh on December 01, 2016, 09:03:04 PM
EDIT: Scrub that idea, I was thinking tags to tags, not tags to file!
Title: Re: Can I use another tag to output to file than ">"
Post by: Phil Harvey on December 01, 2016, 09:08:56 PM
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
Title: Re: Can I use another tag to output to file than ">"
Post by: BenHayat on December 01, 2016, 09:19:25 PM
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!
Title: Re: Can I use another tag to output to file than ">"
Post by: Phil Harvey on December 01, 2016, 09:30:49 PM
My second example does just that.

- Phil
Title: Re: Can I use another tag to output to file than ">"
Post by: BenHayat on December 01, 2016, 09:53:10 PM
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.