I am trying to create a button that will take the full paths of two files selected in the lister, and use those with MKVMerge to merge the two files together, outputting to a named folder.
The use case is for merging subtitle .SRT files into the parent's video file.
To do this, I need to run an external command that looks like this:
mkvmerge -o <dest> <source files>
This seems simple enough, but there's a complication. For <dest>
, I want to take the filename only of the selected file, change it's extension to mkv
, and also change it's folder from the folder containing the selected files to a hard-coded one.
So my command becomes:
mkvmerge -o "D:\Movies\{file$|ext=mkv}" {allfilepath$}
This doesn't work, because {file$}
is putting quotes around the filename, breaking the constructed destination path.
If I stick @nofilenamequoting
in the command, that works, but then {allfilepath$}
breaks because the individual paths there are no longer quoted and mkvmerge gets confused.
So, is there a way to selectively disable the quoting?
Or another way I can achieve what I'm trying to do?
Thanks!