Find partial match

Started by daveb30, February 02, 2024, 05:20:00 PM

Previous topic - Next topic

daveb30

I would like to search a directory for files that have a partial metadata match.
I can use the following and get a valid response.  However, I would like to search for a partial match and not an exact match.  I would also like the partial match to be anywhere in the metadata (not required to be at the beginning).
exiftool -if "$AlbumArtistSort eq 'Abair, Mindi'" -p "$directory/$filename" -ext flac -r "x:\flac" >found.txt

An added benefit would be if I could search multiple tags with the same command (say... AlbumArtistSort &  AlbumArtist)

Thanks
Dave

StarGeek

You would use regular expression match.  Something like
exiftool -if "$AlbumArtistSort=~/Abair, Mindi/ or $AlbumArtist=~/Abair, Mindi/" -p "$directory/$filename" -ext flac -r "x:\flac" >found.txt
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

daveb30