Exiftool Executable csv output formatting

Started by UASPilot256, February 19, 2021, 02:22:10 PM

Previous topic - Next topic

UASPilot256

I am using the following exiftool executable and getting the attached csv output. Most everything (labels and data) are lumped together into Column A. How do I get this to be exif field names in Row 1 and the associated data in row 2? Or Exif field names in column A and data in column B?


exiftool(-a -m -u -w csv).exe

Thanks!

Phil Harvey

You forgot the -csv option.  Try this:

exiftool(-a -m -u -w csv -csv).exe

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

UASPilot256

Hi Phil,
I am not getting a "Error: File not found - csv" message.

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

UASPilot256

I followed what you suggested, but added a -k to see the data. Took out the -w as it was throwing an error when used with -csv as well. Field names and data show up in command line but is preceded by that same error message. Followed by "1 images files read", "1 files could not be read".

exiftool(-k -a -m -u csv -csv).exe

Phil Harvey

The -w option requires an argument giving the file extension, so it must appear as -w csv

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

UASPilot256

Got it. So leaving out the -w for now, because I'm still having issues. I've now used these arguments, it generates data in the command line view, but after pressing enter, no .csv file is saved to the location.

exiftool(-k -a -m -u -csv).exe

Phil Harvey

Ah, right:

> exiftool a.jpg -k -a -m -u -csv -w csv
Sorry, -w may not be combined with -csv


This is because of the way -csv functions on multiple files.

Typically the -csv option is used only for multiple files, but the -w option is designed to have one output file for each source file.

Are you doing this on one file at a time?  If doing it for multiple files, where do you want the output file and what do you want it named?  For this you could use a Windows .bat file and redirect the output to a file.

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

UASPilot256

I've been testing with 1 input file, but will be eventually using it for multiple input files, written out to 1 csv file.

So for multiple files, I should be able to drop a folder of images on a .bat file, with the below code, and have it export to a csv right?

exiftool.exe -k -a -m -u -csv > output.csv

When I do the above a csv is generated but is blank.

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

UASPilot256

Yes! Thank you Phil and StarGeek! Much appreciated.