Any way to ignore non-existent files when writing from CSV?

Started by 3design, May 30, 2013, 12:46:16 PM

Previous topic - Next topic

3design

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

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

3design

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.