News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Import "updated" CVS files - error

Started by Erwin, July 04, 2019, 07:38:35 AM

Previous topic - Next topic

Erwin

Hi,

Exporting and Importing of CSV files works OK with the following commands:

exiftool -csv "C:\Users\Erwin\Desktop\Test" > "c:\Users\Erwin\Desktop\TT11.csv"
exiftool -csv="c:\Users\Erwin\Desktop\TT1.csv" "C:\Users\Erwin\Desktop\Test"

But if I update the CSV in Excel, and save it as CVS UTF-8 (or any other CSV format), I get the following message when trying to import:
No SourceFile 'C:/Users/Erwin/Desktop/Test/IMG0074.HEIC' in imported CSV database
(full path: 'c:/users/erwin/desktop/test/img0074.heic')


I am using W10 and the latest exiftool

Phil Harvey

What is the SourceFile entry for IMG0074.HEIC in the CSV 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 ($).

Erwin

Hi Phil,

It is C:/Users/Erwin/Desktop/Test/IMG0074.HEIC


Phil Harvey

I don't understand how this could happen.  What is the output of this command?:

exiftool -v2 -csv="c:\Users\Erwin\Desktop\TT1.csv" "C:\Users\Erwin\Desktop\Test"

(you can send it to a text file by adding "> out.txt" to the end of the command, then attach the text here)

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

Erwin

Hi Phil, If I add the v2 option to the command, without opening and saving it again in Excel, the import is successfully.

Reading CSV file c:\Users\Erwin\Desktop\TT1.csv
Imported entry for 'C:/Users/Erwin/Desktop/Test/IMG_0074.JPEG' (full path: 'c:/users/erwin/desktop/test/img_0074.jpeg')
Imported entry for 'C:/Users/Erwin/Desktop/Test/IMG_0074.MOV' (full path: 'c:/users/erwin/desktop/test/img_0074.mov')
Imported entry for 'C:/Users/Erwin/Desktop/Test/IMG_0074.JPG' (full path: 'c:/users/erwin/desktop/test/img_0074.jpg')
Imported entry for 'C:/Users/Erwin/Desktop/Test/IMG0074.HEIC' (full path: 'c:/users/erwin/desktop/test/img0074.heic')
=

But if I open the file in Excel, and save it again (under a different name TT3.csv), it will fail again

Phil Harvey

It looks like nothing at all was imported from the edited CSV file.

Could you attach the edited CSV 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 ($).

Erwin

Hi Phil,

The only thing I have done, is opening the TT1.csv file in Excel, and saved it under a different name (CSV UTF-8 format).
I did not even split the data into columns as you normally do when you want to update the data.

I have attached both TT1.csv file (as generated by ExifTool) and TT3.csv file (as generated by Excel).

Erwin

Phil Harvey

Ah,

It seems that you have not properly imported the CSV into Excel.  You have imported it as a straight text file somewhow.  It only has one column.  (ie. there are quotes around the whole line for each of the rows but the first)

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

Erwin

Hi Phil,

If i properly import it, and split it into different columns, it doesn't work either. I have attached TT5 and the error message.
It seems that the first row of the file (with the tags) can not be read.

Erwin

Phil Harvey

TT5 isn't a CSV file.  It uses semicolons, not commas.  I guess that makes it a SSV file :P

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

Erwin

Does this mean i can't update the TT1.csv file in Excel, and have it imported afterwards with ExifTool?
If not, I would like to know how to do it properly in Excel......:-)

Phil Harvey

I think this is a question for an Excel expert... How do you export a valid CSV 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 ($).

StarGeek

One option might be to use Libre/OpenOffice.  There is an option there when you export to choose the separator.

In Excel, it looks like the separator is chosen under Windows Region Settings, not from within Excel.  I don't know what windows version you have so I can't direct you to get to the setting through the gui, but on the command line, you can get there by typing control intl.cpl.  On my Win10, that brings up this window.  Click "Additional Settings".

Then change "List separator" to a comma


Hopefully that would work for you.
* 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).

Phil Harvey

* Phil Harvey impressed you figured this out

Edit:

* Phil Harvey also just discovered this forum's "/me" formatting code
...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 ($).

StarGeek

To be honest, I can't test it out to see if it works as I don't have Excel.  It was the third or fourth tier answer on a SuperUser question on a similar subject.  Hopefully it works.

* 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).