Skip to content

Instantly share code, notes, and snippets.

@crossdjinn
Last active November 24, 2018 05:12
Show Gist options
  • Save crossdjinn/ec8686582b1028b18f49ce82d86f2948 to your computer and use it in GitHub Desktop.
Save crossdjinn/ec8686582b1028b18f49ce82d86f2948 to your computer and use it in GitHub Desktop.
bash, mkvtoolnix => set the title of all mkv files in a directory, by the filename
#!/bin/bash
# This script takes all mkv files in the current directory and sets the filename
# (without .mkv) as its title in metadata
# https://apple.stackexchange.com/a/273021
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