Log in

View Full Version : Extraction massive of attachments on mkv files


Overdrive80
16th February 2013, 03:36
Hi guys, actually I need extract .rar files attachments on 153 mkv files. I know how extract one-by-one:


@echo off
Extract attachments

cd "C:\Program Files (x86)\MKVToolNix"

mkvextract attachments 001.mkv 3:001.rar



If I want extract all in one operation, I think that should manipulate mkvinfo. Maybe so:

mkvinfo 001.mkv | findstr *.rar

Somebody help me??

Asmodian
16th February 2013, 10:29
I would use two batch files but I don't know what you want to do with mkvinfo.
One that you run:
for %%a in (*.mkv) do call "ExtractAttachments.cmd" "%%a"

and the "ExtractAttachments.cmd" called in the first:
"C:\Program Files (x86)\MKVToolNix\mkvextract.exe" attachments %1 3:"%~n1.rar"

If the attachment isn't always 3 I would just extract them all and sort by size. :p

Overdrive80
16th February 2013, 16:44
If the attachment isn't always 3 I would just extract them all and sort by size. :p

First, thanks for your answer.

The ID of rar isnt always 3, but I would want use info of mkvinfo for autoselect attachements of type *.rar, with his own name and not source filename.