Failed Condition

Started by nitinkan, July 18, 2019, 12:14:57 PM

Previous topic - Next topic

nitinkan

How do I go about getting a list of files that "failed condition" (-if)?

Phil Harvey

You could do this, but it would be a separate command:

exiftool -aaa -if "not CONDITION" DIR

Either that, or add -v to the original command and look for lines with "(failed condition)".

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

nitinkan

I would like to get a list of (failed condition) files formatted in a way that can then be programmatically re-processed from the same (windows) batch file.

Trying to do the following:
- If DateTimeOriginal exists, rename files with DateTimeOriginal.
- For failed condition files, set AllDates and Filename to FileModifyDate.

Is there a way to store the failed condition list in some sort of global/persistent variable using .ExifTool_config?  Or can this be done in some other manner via perl or windows batch scripts?  Looking for ideas to do this without manual intervention ...

Phil Harvey

This can be done in one command using a little trick from this post:

exiftool "-filename<filemodifydate" "-filename<datetimeoriginal" "-alldates<${filemodifydate#;$_ = undef if $self->GetValue('DateTimeOriginal')}" -d YOUR_FILENAME_DATE_FORMATTING DIR

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