Created
March 4, 2018 05:14
-
-
Save Mnkai/3d7c43986f7592a4b05f649a91780027 to your computer and use it in GitHub Desktop.
Rename video file name to include episode number information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
1=$(basename $1) | |
EPINUM=$(ffmpeg -i "$1" 2>&1 > /dev/null | grep episode_sort | cut -d ":" -f 2) | |
mv $1 $(printf %02d $EPINUM)" "$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment