Archive for March 2017

PowerShell script to move and rename new episodes to specific folders

You can set up qBittorrent's RSS-downloader to automatically download your favorite series. Kodi is a media center platform that uses info from to organize your media in a library and provide meta-data (such as ratings, summaries and artwork). To scan and parse the correct movies and episode precise file naming is essential. This takes time and that's where this script comes in.

This script will automatically move and rename downloaded files based on episode names to your library location, so you can let Kodi scan these files so you will have the right meta-data in your library.

PowerMove fills the gap between Bittorrent and Kodi and is a simple PowerShell alternative to some of the rename tools on this page.

To fully automate your downloads you can use:

  1. qBittorrent
  2. PowerMove
  3. Kodi

Basically it's Build-your-own-Netflix.

1. Install and configure qBitTorrent

... or use another client you prefer. Instructions go by qBitTorrent though.

1. Download and install qBittorrent.

2. Configure qBittorrent to put incomplete downloads in one (sub)folder (e.g. C:\Downloads\_incomplete) and move them to a different folder when they are complete (e.g. C:\Downloads\). This is so PowerMove can scan a single directory that will only contain completely downloaded files.

qBittorrent Options - Default Save Path / Keep incomplete torrents in:

3. Configure qBittorent to automatically download shows you like. You can find RSS feeds on your favorite websites.

Example of qBittorrent RSS-downloader configuration

If you need more help, there are plenty of online guides available for this part.

Now that your favorite shows are automatically downloaded to this folder, we can proceed to the following step.

2. Install and Configure PowerMove.ps1

1. Download PowerMove.

2. Copy the PowerMove.ps1 and Series.csv to a suitable location (e.g. C:\Scripts\PowerMove\)

3. Open PowerMove.ps1 and modify the variable $DownloadsDirectory to match the directory that contains your downloads. (E.g.: $DownloadsDirectory = "C:\Downloads\")

4. Open and modify Series.csv (best to use Notepad). You can add lines for any show you want to move to your library.

Leave the first line (header) intact.

Each line should follow this format (same as header): Name,Pattern,Path,SeriesID

Put double quotes when spaces are included, or do so anyway.

E.g.: "My Show","My.Show*","D:\Series\My Show (1997)",123456

Name: Name of the Show
Pattern: Pattern the file name adheres to so it can be recognized as this particular show.
Path: Directory of file share to move the file to.
SeriesID: You can find the SeriesID for any series on

The file will be renamed to the following format: <Name> - SXXEXX - <Episode Name>.<Ext>

2a. Schedule PowerMove.ps1 (Optional)

You can either run the script manually or schedule it using Windows Task Scheduler.

Make sure your system allows for the running of PowerShell scripts. Set your execution policy using the Set-ExecutionPolicy command. Read this page for more info.

Warning: if you use network drives as a download location or a library location, please make sure you specify the full UNC network path (e.g. \\server\media\video\) and NOT a drive letter. Drive mappings are not available when a user is not logged on.

Action: Start program
Program/script: powershell.exe
Parameters: -ExecutionPolicy Bypass -File "C:\Scripts\PowerMove\PowerMove.ps1"

Copyright Dave Thijssen. Powered by Blogger.