exiftool – Find jpg files without Keywords/Subject in Iptc/Xmp and copy them

I made this batch, but in my test all images were copied, maybe because JPGs usually don’t have XMP or IPTC metadata? Please test this on test files first to see if it really does what you intend.

@echo off
chcp 1252 >nul

set "Source=%userprofile%\desktop\test\source"
set "Destiny=%userprofile%\desktop\test\destiny"

if not exist "%Source%" exit
if not exist "%Destiny%" md "%Destiny%"

For /f "delims=" %%a in ('exiftool -p "$directory\$filename" -api filter^="tr(/)(\\)" -s3 -q -if "not $xmp:all and not $iptc:all" -r "%Source%\*.jpg"') do (
                                                                                                                                                      if not exist "%Destiny%%%~pa" md "%Destiny%%%~pa" 
                                                                                                                                                      copy "%%~a" "%Destiny%%%~pa"            
                                                                                                                                                     )

                                                                                                              )

Read more here: Source link