ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: JulianNario on June 06, 2019, 07:10:25 AM

Title: All output in one file :-(
Post by: JulianNario on June 06, 2019, 07:10:25 AM
Hi guys,

I created the exiftool.exe and added the following commands:
exiftool (-k -g -a -u -r  -w csv).exe

Now I want to drag and drop a folder with images onto this .exe

Unfortunately the tool creates one file per each .JPG.
But I want one .CSV file with all image data included.

What must I do? Working now for hours with the FAQ but I dont get it :/
Title: Re: All output in one file :-(
Post by: Phil Harvey on June 06, 2019, 07:28:19 AM
Did you mean to use the -csv option (since you're creating a CSV file)?

Unforunately, the -csv option is not compatible with any of the output-to-file options, so it would be better to do this with a .BAT file.  The .BAT file could contain a command like this:

c:\path\to\exiftool -k -g -a -u -r -csv %* > c:\path\to\out.csv

But I don't recommend using the -csv for a very large number of images.  Up to 1000 or so should be OK, but beyond that at some point you could run out of memory.

- Phil
Title: Re: All output in one file :-(
Post by: JulianNario on June 13, 2019, 02:56:17 PM
it still creates a separate file for each .JPG.

How can I define that it just makes on file with all information in it?
Title: Re: All output in one file :-(
Post by: StarGeek on June 13, 2019, 04:01:26 PM
Quote from: JulianNario on June 13, 2019, 02:56:17 PM
it still creates a separate file for each .JPG.

Did you create a BAT file? 

I just tested Phil's example here, placed the listed command in a bat file, dragged and dropped some files onto the icon, and it created a single CSV file.
Title: Re: All output in one file :-(
Post by: dogster on June 14, 2019, 09:49:57 AM
Stargeek,
i'm not a star-geek, any chance of showing me the text you have in your batch file, I couldn't get mine to work.
Thanks
Title: Re: All output in one file :-(
Post by: Phil Harvey on June 14, 2019, 09:53:26 AM
I think the batch file contained this command, as mentioned:

c:\path\to\exiftool -k -g -a -u -r -csv %* > c:\path\to\out.csv

of course, the paths would change according to where you have the files on your system.

- Phil
Title: Re: All output in one file :-(
Post by: StarGeek on June 14, 2019, 12:55:53 PM
Quote from: Phil Harvey on June 14, 2019, 09:53:26 AM
I think the batch file contained this command, as mentioned:

Yep, I literally just copy/pasted that line and corrected both of the "c:\path\to\" parts.  Dragged the resulting BAT file onto the desktop and dragged/dropped a mixture of individual files and directories onto it.  It then created the out.csv file correctly.
Title: Re: All output in one file :-(
Post by: dogster on June 19, 2019, 07:48:00 AM
Thanks StarGeek,
I am not proud to admit that I am not competent with this stuff. I am not a programmer.
However, following your instructions and 'literally copy and pasting' it worked a treat.
Obviously I was doing something daft.
Thanks

Next question, that gives me 210 columns (I can easily extract what I need), but is it possible to write only what I need?

Title: Re: All output in one file :-(
Post by: Phil Harvey on June 19, 2019, 08:21:32 AM
Quote from: dogster on June 19, 2019, 07:48:00 AM
is it possible to write only what I need?

Yes.  Just add a command-line argument for every column that you want output.  The arguments will be the same as the column heading(s) with leading dash(es).  Note that the SourceFile column is built into the -csv option, so you don't need to specify this one.

- Phil