Import only files from CSV Sourcefile List

Started by Christian S, October 13, 2016, 11:45:40 AM

Previous topic - Next topic

Christian S

Hello Phil,

i have a new Excel / CSV to change only a littel part of JPG files from the folder.
Background: The CANON ZoomBrowser EX are safe the category and Ratings in a textfile and i safe this data after covert to a CSV into the JPG EXIF-DATA.
The conversion with manual Word Makro Serach and replace are works fine.

My problem is not all Files in my directory are in my CSV and the Exiftool write the error sourcefile are not in the CSV.

How could i set only files from the csv are scan and updated?

How could i disable the error and only show the error message when the filename in the CSV are miss in the Directory or is with umlauts?

It's correct the Exiftool not work with words or Folder with umlauts?
Current i switch to the folder and start on this location the exiftool.

Many thanks

Dear Christian

Phil Harvey

Hi Christian,

Quote from: Christian S on October 13, 2016, 11:45:40 AM
How could i set only files from the csv are scan and updated?

Only the ones in the CSV will be updated.  ExifTool scans the files you specify on the command line.  If you can't specify the files you want updated, then you will get the desired results if you can live with the errors for the files missing from the CSV.

QuoteHow could i disable the error and only show the error message when the filename in the CSV are miss in the Directory or is with umlauts?

I don't think this is possible.

QuoteIt's correct the Exiftool not work with words or Folder with umlauts?

You should be able to get this to work.  See The Windows Unicode File Names section of the home page.

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

Christian S

Hello Phil,

i use the windows cmd an change to "chcp 65001".
Now the Names are correct display with german umlauts.
My problem is exiftool not found the Sourcefile in the csv.

exiftool -lang de -charset filename=Latin1 -overwrite_original -csv=vespa-input.csv -ext JPG -ext CR2 .

No SourceFile './IMG_5523 - Kopä.JPG' in imported CSV database

What shoud i do?

Thanks

Christian S.

Phil Harvey

Hi Christian,

You're right.  This doesn't seem to work if the CSV is encoded in Latin.  I will look into this when I get a chance.

It should work if you use UTF-8 encoding for the CSV file and specify -charset filename=utf8 instead.

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

Phil Harvey

OK.  I have spend a lot of time working through this.  In the CSV file, the character encoding should be specified by the ExifTool charset.  This includes the SourceFile column.  I will try to make this consistent with ExifTool 10.31 (to be released soon).  So with this version, importing a CSV which includes unicode file names should work as long as you specify the same charset options when reading and writing.

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

Christian S

Hello Phil,
Thank you for your reply.  :)
The Problem ist the Export from MS Excel to csv.
I have the solution.

1. Change Separator to comma ","
==============================
Change the Country in the Windows settings from German to United States of America.
Now it save the CSV with correct Separator  "," and not with ';" like German style.

2. Convert CSV-File from Unicode "ANSI" to "UTF-8"
===========================================
Open CSV with Notepad++  https://notepad-plus-plus.org
menu Encoding > convert to UTF-8

Now the Exiftool can found the Sourcefiles with German umlauts.

I have a question. I test to select a other separator for import but it do not work.
I think it works only for export Data to CSV.
Could you please at the Feature for importing to?

Many thanks.

Christian S


Phil Harvey

Hi Christian,

FAQ 26 gives some help with importing from 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 ($).