Skip to content

Instantly share code, notes, and snippets.

@RagedUnicorn
Created August 18, 2018 15:22
Show Gist options
  • Save RagedUnicorn/b06b083736bf03ffe7271b929fe62593 to your computer and use it in GitHub Desktop.
Save RagedUnicorn/b06b083736bf03ffe7271b929fe62593 to your computer and use it in GitHub Desktop.
Setting mkv filename as metadata title
@echo off
REM This script takes all mkv files in the current directory and sets the filename (without .mkv) as its title in metadata
for %%x in (*.mkv) do (
mkvpropedit "%%x" --edit info --set "title=%%~nx"
)
pause
#!/bin/bash
# This script takes all mkv files in the current directory and sets the filename (without .mkv) as its title in metadata
for mkvfile in *.mkv; do
mkvpropedit "$mkvfile" -e info -s title="${mkvfile::-4}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment