Last active
June 3, 2021 01:35
-
-
Save lukekrikorian/39b071f64eabfc336d6974075150352b to your computer and use it in GitHub Desktop.
Rename yts.mx films
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
# requires GNU `rename` | |
rename 's/(.x264|.BluRay|.720p|.1080p|.2160p|.YIFY|.AAC^5|.AAC5\.1|.BrRip|.WEBRip|.VPPV|.BOKUTOX|\-\[YTS..{2}\])//g' *.mp4 | |
rename 's/\.([^mp4])/ $1/g' *.mp4 | |
if [ "$1" == "--remove-years" ]; then | |
rename 's/ \d{4}(\.mp4)/$1/' *.mp4 | |
fi | |
echo "Done!" | |
# Example: PVT.CHAT.2020.1080p.BluRay.x264.AAC5.1-[YTS.MX]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment