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.


/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 )
|improve this answer|||||
  • 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 Jun 20 '17 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.