ExifTool is a cross-platform tool which will work from the Windows command line. It is very powerful, with a perl-based syntax allowing comparison of various metadata. In a directory full of JPEG files, this command
will print a list of all files where the beginning of the filename does not match the year from the date-taken EXIF value:
exiftool -d "%Y" -if "$FileName !~ /^$DateTimeOriginal/" -p "$FileName" *.jpg
Note the double quotes since you are on Windows. On Mac or Linux, use single quotes:
exiftool -d '%Y' -if '$FileName !~ /^$DateTimeOriginal/' -p '$FileName' *.jpg
This will also print something like "1600 files failed condition" — here, "failed" means that they are named correctly, since the "condition" given is not matching, which is indicated by the !~
operator. Change that to =~
if you want it to print only the files which do match. (The ^
indicates the beginning of the file — the syntax is that of perl regular expressions.)
The part -d '%Y'
sets the date format to be just the year. You can change that to match your naming convention. For example, if your files are supposed to start with a four digit year, two digit month, and two digit day, separated by a dash, use -d '%Y-%m-%d'
.
If you have multiple folders, replace *.jpg
at the end of the line with -r .
, which will make ExifTool run recursively in every one. (The .
is assuming you want to start in the current directory — change the .
to a pathname if you want to run it somewhere else). Also in that case you probably want -p '$Directory/$FileName
instead of just FileName alone.
If you want to dig into it, ExifTool can even rename the files conditionally, so you could extend the above to fix your problem files, rather than just identifying them.
You could also use ExifTool to copy the description portion of your filename into the file's internal metadata, perhaps setting it as the XMP Title.