08/06/02 10:17:35 hcY0V5t00
>>603
setlocal enabledelayedexpansion
mkvmerge -i %1 >tmp.txt
set count=0
for /f "tokens=1,3,6" %%i in (tmp.txt) do (
if %%i==Attachment (
if %%k=='image/jpeg' (
set /a count+=1
set attach!count!=%%j
)
)
)
set count=1
set cmdline=mkvextract --attachments %1
:mkcmd
if not defined attach%count% goto runcmd
set cmdline=%cmdline% !attach%count%!
set /a count+=1
goto mkcmd
:runcmd
if "%attach1%"=="" goto end
%cmdline%
:end
endlocal
このバッチファイルに%path%をパラメータとして与えればできると思う。