<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>

CC BY-SA 3.0
2017-06-20T06:31:29.913Z
Works great, thank you!  Now I get to figure out how to parse all of it so I can remove the extra audio and subtitles! :D
Dizzy49
CC BY-SA 3.0
2017-06-20T04:14:34.863Z
2017-06-20T04:14:34.863Z
Gyan
<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>

<ffmpeg>
Recursively Check MKV with ffprobe
Dizzy49
# Recursively Check MKV with ffprobe

(Asked by: username_0 on 2017-06-20)

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.

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2017-06-20. Score: 2 | Accepted answer

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

> **Comments:**
> **username_0**: Works great, thank you!  Now I get to figure out how to parse all of it so I can remove the extra audio and subtitles! :D  

---

