Forrest logo
back to the for tool

for:ai:0c057

How do I process all mkv files in a folder using mkvmerge in the bash command line?
$ for file in *.mkv; do mkvmerge -o output.mkv $file; done
try on your machine

This command uses a for loop to iterate through all the .mkv files in the current folder, then uses mkvmerge to merge each file into a single output file named output.mkv.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • How do I process all mkv files in a folder using mkvmerge in the bash command line?
back to the for tool