scripts/rename_movie_by_title.sh

4 lines
132 B
Bash
Executable File

#!/usr/bin/env bash
[[ -z $1 ]] && echo 'Need a filename.' && exit
exec mv $1 $(mediainfo $1 | grep Title | head -n1 | cut -d: -f2)