user19228: 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 >> results.txt

Also, Ideally I would like to exclude any "trailer.mkv" file.

user1871: /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>> results.txt )


19228: <p>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.</p>

<p>This is what I am trying and it is not working...</p>

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

<p>Also, Ideally I would like to exclude any "trailer.mkv" file.</p>
 1871: <p><code>/D</code> is for processing directories, not contents of directories.</p>

<pre><code>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 )
</code></pre>
