CLI tool to rename files for tv-shows to add S01E01 notation based on folder location
Last updated a year ago by megaboich .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tv-shows-file-renamer 
SYNC missed versions from official npm registry.


CLI tool to automatically rename and group files for TV series.

Main functionality:

  • Extract series metadata from API.
  • Group episodes by Season folders.
  • Automatically change subtitles encoding to UTF-8 from specified encoding.
  • Build filenames which are easily recognizable by Plex mediaserver

So, if you have bunch of files named like this:

???? 150.mkv
???? S09E11 - ONEPIECE - 153.mkv
???? [CoolSubsTeam] - 196 - OnePiece.mkv

The tool provides a fast way to get this:

???? Season 09
    ???? S09E007 - 150 - Dreams Don't Come True! Bellamy vs. The Saruyama Alliance.mkv
    ???? S09E007 - 150 - Dreams Don't Come True! Bellamy vs. The Saruyama
    ???? S09E010 - 153 - This is the Sea of the Sky! The Knight of the Sky and Heaven's Gate.mkv
???? Season 10
    ???? S10E001 - 196 - Emergency Announcement! An Infamous Pirate Ship has Invaded!.mkv


This tool is built with NodeJS, so it should be installed in your system.

  • NodeJS at least v8.5.0
  • NPM at least 5.3.0


npm i -g tv-shows-file-renamer


Just call it in folder with your series and specify parameters

tv-shows-file-renamer -s one-piece

Commandline parameters:

Key Value Description Example
-s serie identificator This is a serie identificator used by API. To get it you need to locate you serie on the website and copy part of URL.
For example for this url: the serie id is one-piece
-s one-piece
-d dry run mode You can check expected output but without actual performing any operations on disk. Useful when you are not sure about whether metadata are correct. -d
-m only extract metadata Does not perform any operations with you series, only downloads metadata for given serie from API and saves that to META.json file. -m
-e encode subtitles Performs re-encoding of *.srt files from specified encoding to UTF-8 -e cp1251

Please use it on your own risk, if you are not sure please make backup of your data first!

Licence: MIT

Current Tags

  • 1.0.6                                ...           latest (a year ago)

7 Versions

  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 2
Dependencies (6)
Dev Dependencies (6)
Dependents (0)

Copyright 2014 - 2017 © |