Recursively Check MKV with ffprobe The basic of what I'm trying to do is to run through my old encodes recursively and output the results of ffprobe to a file so I can review it.

This is what I am trying and it is not working...

for /d /r "D:\Video\TEST" %%a in *.mkv do if exist "%%a" echo ffprobe.exe -i "%%a" -hide_banner &gt;&gt; results.txt


Also, Ideally I would like to exclude any "trailer.mkv" file.
/D is for processing directories, not contents of directories.

for /r D:\Video\TEST %%a in (*.mkv) do (
  if "%%~nxa" neq "trailer.mkv" ffprobe.exe -i "%%a" -hide_banner 2&gt;&gt; results.txt )