Batch remove title from .mkv files

13,480

Solution 1

Was looking for a way to solve this issue, because when streaming from windows to my TV, the TV would play the files out of order as it was sorting the files alphabetically using the title.

Using some of the above answers, this script worked for me in PowerShell (obviously replace the paths as appropriate for your environment:

foreach ($f in Get-ChildItem "C:\Users\User\Videos\") { D:\Programs\mkvtoolnix\mkvpropedit.exe "C:\Users\User\Videos\" -d title }

Solution 2

This is a single batch file option. In a .txt file, save the code below and then rename the file extension to .bat or .cmd to create the Windows batch file.

for %%A IN (*.mkv) do ( "C:\Program Files\MKVToolNix\mkvpropedit.exe" -d title "%%~A") pause

When run, it filters only .mkv files in the current folder or directory, it then proceeds to remove the titles for all the mkv files it found in the folder or directory. Using this method, the mkv files are not re-encoded nor are they copied.

I hope this helps, if not anyone else, maybe myself, when I need this again in future. ;-)

Share:
13,480

Related videos on Youtube

user608088
Author by

user608088

Updated on September 18, 2022

Comments

  • user608088
    user608088 almost 2 years

    Trying to remove the "title" attribute from a bunch of MKV files. Windows Explorer is being blocked by COM Surrogate which is keeping this (How to remove title and other metadata from video files?) from working. Is there a command I can run that will iterate through all the files and remove the "title" with either mkvmerge or mkvpropedit?

    • Jedi
      Jedi about 8 years
      Did you try the linked solution on a smaller subset of files and still fail?
    • user608088
      user608088 about 8 years
      Unfortunately even on one its being blocked.
    • ejbytes
      ejbytes about 8 years
      Ctrl + Alt + Del, check task manager, processes. Verify what applications are running. There are a thousand reasons why your process is locked. Something is using it. Torrent, some p2p share, other share, so many reasons. I use this when I "actually really don't know what could be locking the file". lockhunter.com The rest of your answer is a question of writing a program in batch code. Look for "batch file dos examples iterate files". You have to do some work before you ask for help.
  • Ξένη Γήινος
    Ξένη Γήινος over 3 years
    The code in your file contains two wrong slashes, Windows uses backslashes as directory separators.