Mkvmerge error since update

Hi, I was using a small script to mux 2 files together (basically, you keep the video from one and everything else from the other file).

Here is the script:

for %%x in (S01R/*.mkv) do "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "S01\%%~x" -D ("S01R\%%~x") -A -S -T -M -B --no-chapters ("S01V\%%~x")

I didn’t use it for few months and I updated to v91 recently. Today I get the error: could not be opened for reading: open file error

Is there any fix possible?

A generic “open file error” usually means that the file name you specified doesn’t exist. There’s nothing to fix in MKVToolNix; it’s a usage error.

Well I thought about that but I used that script a lot before updating MKVtoolnix and it was working fine.
My files are stored in a folder like: S01R/S01E01.mkv and S01V/S01E01.mkv (V = video and R = rest) to avoid any space, special char, …

As you can see, it’s not a complicated script, it simply mux 2 files together and it was working like a charm before updating. So I wonder why, now, it can’t open the files anymore.

So what’s the full actual error message? 'cause you only posted part of it. Maybe that’ll shed some light on what’s different now on your end.

Additionally it would help to see the directory listings of both directories (the original ones, meaning screenshots, not you typing out the names, otherwise chances are you actually mistype something).

Sure! Here is a screenshot
The error is in french but it’s: “Error: : The file “(S01R\S01E03.mkv)” could not be opened for reading: open file error”

EDIT: Never mind… I just realised by translating the error in english that I removed the spaces in the script and it was because of that… Since I didn’t use it for a long time, I thought it was a mistake I made.
I realized it was trying to find a file called (S01\S01E01.mkv) with the parenthesis in the name.

So the script works fine if I put:

 for %%x in ( S01R/*.mkv ) do "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "S01\%%~x" -D ( "S01R\%%~x" ) -A -S -T -M -B --no-chapters ( "S01V\%%~x" )

instead of

for %%x in (S01R/*.mkv) do "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "S01\%%~x" -D ("S01R\%%~x") -A -S -T -M -B --no-chapters ("S01V\%%~x")

Sorry for the inconvenience :face_with_peeking_eye:

No worries. Glad you figured it out!

1 Like