Using CLI to rename and relocate TV shows.

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
athphane
Posts: 3
Joined: 13 May 2017, 04:51

Using CLI to rename and relocate TV shows.

Post by athphane »

Windows 7 Pro x64

I have a folder where all new TV show episodes appear in almost every day. The episodes are again stored in a folder of their own.

What i want to do is simple. So simple that i cannot figure out how to do it using the CLI.
Rename TV shows stored in their own folders, eg: D:/potato/name.of.folder.with.show/show.extention , and move the renamed ones to a drive with a specific naming convention, mentioned below.

Here is my process as of right now.
I select the folders with the tv shows.
i Drag them into filebot. Fetch data using TheTVDB.
And rename using the following episode format:

Code: Select all

F:/Series/{n}/Season {s}/{n} - {s00e00} - {t}
Some TV shows, like The Blacklist, are not identified automatically and needs manual intervention. Can this be done automatically by the CLI?

I want to do this automatically without me opening any GUI or moving files into FileBot. Pls help.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using CLI to rename and relocate TV shows.

Post by rednoah »

1.
What have you tried so far? What didn't work? What did the output say?

Here's the manual to get you started:
http://www.filebot.net/cli.html


2.
Presets can be used to easily achieve a nice level of automation in the GUI, such as selecting files, selecting a database, using a specific format, etc.
:idea: Please read the FAQ and How to Request Help.
athphane
Posts: 3
Joined: 13 May 2017, 04:51

Re: Using CLI to rename and relocate TV shows.

Post by athphane »

Currently having school exams this week..
So I made a small snippet of code a few days back.

Code: Select all

filebot -rename -r -non-strict "D:\Torrent Downloads\Completed\TV Show" --db TheTVDB --format "F:/2.Series/{n}/Season {s}/{n} - {s00e00} - {t}"
This works. Somewhat. In the FileBot program, when I set the rename format to "F:/2.Series/{n}/Season {s}/{n} - {s00e00} - {t}", it renames and MOVES the file to the respective folder. Also when I do this manually using the FileBot application, I remove the .nfo and .txt and basically any other file except the actual video files.
Image

Using the CLI yields different results.

Image

The CLI also renames and moves the video files as well as the .nfo files, which I do not necessarily want.
Is there any command to tell FileBot not to do anything with .nfo files? Or is there a set of commands that I can use that will remove the .nfo files from a directory recursively and then deploy the CLI command that I have come up with?
In a .bat file?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using CLI to rename and relocate TV shows.

Post by rednoah »

I'd use the amc script for this kind of stuff:
viewtopic.php?f=4&t=215#p3382
:idea: Please read the FAQ and How to Request Help.
athphane
Posts: 3
Joined: 13 May 2017, 04:51

Re: Using CLI to rename and relocate TV shows.

Post by athphane »

Completely abandoning this. Talk to me about presets.
Is there any way I can select files of multiple extensions in one preset?
Like for Tv Shows some of the downloads are in different formats. mkv and mp4 most commonly.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using CLI to rename and relocate TV shows.

Post by rednoah »

Do you mean format expressions for the amc script? Or Presets for the GUI?


Presets allows you to auto-select files in the GUI from a predefined folder with predefined includes rules.

Include *.mkv and *.mp4 files:

Code: Select all

ext =~ /mkv|mp4/
Include video files:

Code: Select all

f.video
Include episode video files:

Code: Select all

f.video && f.episode
:idea: Please read the FAQ and How to Request Help.
Post Reply