Author Topic: Any way to ignore non-existent files when writing from CSV?  (Read 1804 times)

3design

  • Jr. Member
  • **
  • Posts: 29
I've got a CSV file containing several thousand images, across several subfolders.

\root\ (this folder contains the CSV)
\root\subfolder_01\ (contains a bunch of images)
\root\subfolder_02\ (contains a bunch of images)
\root\subfolder_03\ (contains a bunch of images)

I'd like to remove subfolder 01 and 02 and then write tags from the CSV file, so it would basically ignore any rows referencing 01 and 02 and only write tags to files in 03.. Anyway, that was my intention, but it actually stops writing as soon as it can't find the first reference. The error is "No such file or directory at script/exiftool line 1374"

So, is there a way to have exiftool simply ignore files that don't exist on the filesystem, and just write the ones it can actually find? Will -m accomplish that, or is there another way?

3d.

3design

  • Jr. Member
  • **
  • Posts: 29
Re: Any way to ignore non-existent files when writing from CSV?
« Reply #1 on: May 30, 2013, 08:27:08 PM »
Hmm, seems like this may have been caused by a folder name being changed on the filesystem and not updated in the CSV. I took a closer look and caught the error, then ran a test on just that folder and it wrote correctly.

3d.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14937
    • ExifTool Home Page
Re: Any way to ignore non-existent files when writing from CSV?
« Reply #2 on: May 31, 2013, 08:55:49 AM »
Just to clarify:  ExifTool processes the files you specify on the command line and looks up each one in the CSV file.  So extra entries in the CSV file have no effect.

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

3design

  • Jr. Member
  • **
  • Posts: 29
Re: Any way to ignore non-existent files when writing from CSV?
« Reply #3 on: May 31, 2013, 11:42:10 AM »
Yeah, I misinterpreted the cause of the error I was getting for ExifTool failing when a file was missing, but what was actually happening was the path to the file, in the CSV, no longer matched the path on the filesystem. Once I stepped away from it for a little bit and had some coffee, it was obvious.