ExifTool Forum

ExifTool => Newbies => Topic started by: _rach_ on October 08, 2019, 12:22:05 PM

Title: adding -sourcfile to .csv
Post by: _rach_ on October 08, 2019, 12:22:05 PM
Hello peoples,

im am trying to add a -sourcefiles column to my base.csv without erasing the file.
I ve try to do :
exiftool -soucefiles -csv  >> base.csv ./

it doesnt work...

Any suggestion please?
Title: Re: adding -sourcfile to .csv
Post by: Phil Harvey on October 08, 2019, 12:23:47 PM
You're trying to add a new column to an existing CSV file?  This can't be done by appending to the file with ">>".

The easiest way to do this would be in a spreadsheet program.

- Phil
Title: Re: adding -sourcfile to .csv
Post by: _rach_ on October 08, 2019, 12:27:51 PM
ty Phil, the idea is to import my base.csv file (without -sourcefile) to my new.csv file (with -sourcefile), in command line. This, to avoid copying and pasting each time into the spreadsheet.
Title: Re: adding -sourcfile to .csv
Post by: Phil Harvey on October 08, 2019, 12:32:12 PM
Well, you could probably copy a column of one CSV file to another with some clever scripting (or maybe google for a utility to do this), but you would have to somehow guarantee that the rows in the two files matched perfectly.

- Phil
Title: Re: adding -sourcfile to .csv
Post by: StarGeek on October 08, 2019, 12:33:10 PM
You might take a look at CSVKit (https://csvkit.readthedocs.io/en/latest/).
Title: Re: adding -sourcfile to .csv
Post by: _rach_ on October 08, 2019, 12:37:40 PM
ty StarGeek, Phil!