Rename is a *nix tool to rename files according to modification rules specified on the command line.
The examples below show how to rename common naming schemes from toreented moveies and tv shows in the way that Plex can parse to gather metadata. The examples all currently use the -n
flag to do a dry run and only print out what the files would be renamed to. Remove the flag to actually overwrite the filename.
'Modern.Family.S05E01.720p.5.1Ch.Web-DL.ReEnc-DeeJayAhmed.mkv' --> 'Modern Family - s05e01.mkv'
'Modern.Family.S05E01.720p.5.1Ch.Web-DL.ReEnc-DeeJayAhmed.srt' --> 'Modern Family - s05e01.eng.srt'
rename -vn -S '.' ' ' -e 's/(.*?)\W+[Ss](\d{2})[Ee](\d{2}).*(.{3})/$1 - s$2e$3.$4/' *.(mp4|mkv|avi)
rename -vn -S '.' ' ' -e 's/(.*?)\W+[Ss](\d{2})[Ee](\d{2}).*(.{3})/$1 - s$2e$3.eng.$4/' *.srt
Creates subdirectory for each movie so that Plex can more easily associate subtitles
'Swiss.Family.Robinson.1960.1080p.BluRay.x264.YIFY.mp4' --> 'Swiss Family Robinson (1960)/Swiss Family Robinson (1960).mp4'
'Swiss.Family.Robinson.1960.1080p.BluRay.x264.YIFY.srt' --> 'Swiss Family Robinson (1960)/Swiss Family Robinson (1960).eng.srt'
rename -vn -S '.' ' ' -e 's/(.*?)\W+(\d{4}).*(.{3})/$1 ($2)\/$1 ($2).$3/' *.(mp4|mkv|avi)
rename -vn -S '.' ' ' -e 's/(.*?)\W+(\d{4}).*(.{3})/$1 ($2)\/$1 ($2).eng.$3/' *.srt
My name doesn't show up on GitHub Enterprise
If the email used in a commit matches a verified GitHub Enterprise user account, the account's username is used, instead of the username set by Git.
New commits aren't using the right name
If git config user.name reports the correct username for the repository you're viewing, but your commits are using the wrong name, !!