Author Topic: adding -sourcfile to .csv  (Read 48 times)

_rach_

  • Jr. Member
  • **
  • Posts: 11
adding -sourcfile to .csv
« 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 :
Code: [Select]
exiftool -soucefiles -csv  >> base.csv ./
it doesnt work...

Any suggestion please?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15115
    • ExifTool Home Page
Re: adding -sourcfile to .csv
« Reply #1 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

_rach_

  • Jr. Member
  • **
  • Posts: 11
Re: adding -sourcfile to .csv
« Reply #2 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.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15115
    • ExifTool Home Page
Re: adding -sourcfile to .csv
« Reply #3 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2749
Re: adding -sourcfile to .csv
« Reply #4 on: October 08, 2019, 12:33:10 PM »
You might take a look at CSVKit.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

_rach_

  • Jr. Member
  • **
  • Posts: 11
Re: adding -sourcfile to .csv
« Reply #5 on: October 08, 2019, 12:37:40 PM »
ty StarGeek, Phil!