Additional row in CSV file being generated

Started by RowleyCW, November 14, 2020, 04:08:58 PM

Previous topic - Next topic

RowleyCW

Hi all,
I'm having problems when extracting EXIF information to a csv file that is being generated in the same folder as the jpg files that I am extracting the data from.

My line looks like this:

exiftool.exe -FileName -GPSAltitude -GPSLatitude -GPSLongitude -csv -n %1 > %1\extracted.csv

where %1 is the folder with all the photos in.

The problem I have is the last row has the SourceFile location and the Filename "extracted.csv" in it.

Is there a way of preventing this final row from being generated please?

StarGeek

This wouldn't be exiftool.  It would be something with your batch file.

Is there a space in the directory you're passing to the batch file?  Try using "%~1\extracted.csv"  That will strip away quotes that would be around the %1 argument if there's a space in it, concat the full path, and quote the full path.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

RowleyCW

Hi StarGeek,

Thanks for your help. I've stripped the bat file right back so that this is the entire thing:

exiftool.exe -all -csv -n D:\Photogrammetry-Project\Survey\Test-Block05-Ev01 > D:\Photogrammetry-Project\Survey\Test-Block05-Ev01\Test-all.csv

I'm still getting the same problem.

Oddly, it works fine on my laptop, but not on my workstation!

StarGeek

Ah, for some reason I was thinking an extra column, not row.

Try adding
--ext csv
to the command so that CSV files are excluded from processing.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

RowleyCW