Creating Movie Genre Directories via CLI

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Creating Movie Genre Directories via CLI

Post by kelleher20 »

Good Evening Everyone,

I'm trying to have FileBot create movie genre directories via the CMI. I'm currently using the following commands in my script:

:ReNames All Files
filebot -script fn:renall "C:\Users\USERNAME\Videos" -non-strict

:ReNames Movie Folders
filebot -script fn:renall "C:\Users\USERNAME\Videos\Movies" -non-strict --db TheMovieDB --def target=folder

I'd like to add a parameter to this, to sort all renamed files/folders into genres of each movie as per what TheMovieDB or IMDB as listed.

In the end I'd like my movie directory to look something like this:

C:\Users\USERNAME\Videos\Action
C:\Users\USERNAME\Videos\Adventure
C:\Users\USERNAME\Videos\Fantacy
C:\Users\USERNAME\Videos\Drama

I found the following post "see below" on how to do this via the GUI, but do not know how to implement this into my script.
viewtopic.php?f=6&t=531


Any help would be appreciated.

Also if possible, does anyone know how I could add something to the "ReNames All Files portion" to have the movie titles include the movie rating?

Thank You
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Creating Movie Genre Directories via CMI

Post by rednoah »

You're doing something really strange. Calling renall twice like this is a bad idea and just shows that you don't understand how the --format works. You'll want to understand how filebot formats work if you want to move/organize files.

Look into the amc script, and pass in a custom format if you want a genre folder or ratings as part of the output path:
viewtopic.php?f=4&t=215
:idea: Please read the FAQ and How to Request Help.
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Re: Creating Movie Genre Directories via CMI

Post by kelleher20 »

So far, what I've have is:

filebot -script fn:renall "C:/Users/USERNAME/Videos/Movies" -non-strict --db TheMovieDB --def target=folder --def "movieFormat=C:/Users/USERNAME/Videos/Movies/{genres[0]}/{n} ({y})" --conflict override

I've already renamed the movie files and folders. Now I'm just trying to sort the movie folders into genre folders; created via Filebot.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Creating Movie Genre Directories via CMI

Post by rednoah »

Use the amc script move all files into a new structure.

* Do not use the renall script (you're using it wrong, and you're confusing it with the amc script)
* Do not process files in place (i.e. input & output folders must not be the same, rename "Movies" to "Movies 2" so you can auto-create the "Movies" folder structure with genres)

e.g.

Code: Select all

filebot -script fn:amc /path/to/movies --output "%USERPROFILE%/Media" --action move --conflict skip -non-strict --def artwork=y ut_label=Movie movieFormat="Movies/{genre}/{ny}/{plex.name}"
:idea: Please read the FAQ and How to Request Help.
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Re: Creating Movie Genre Directories via CLI

Post by kelleher20 »

Awesome. That worked exactly how I wanted it too. With the exception of the artwork which I switched to N. Is there a way to disable the "extras" that are downloaded?
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Creating Movie Genre Directories via CLI

Post by rednoah »

there a way to disable the "extras" that are downloaded?
What extras? --def artwork=y tells it to fetch/generate extra artwork/nfo files.
:idea: Please read the FAQ and How to Request Help.
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Re: Creating Movie Genre Directories via CLI

Post by kelleher20 »

It's been downloading "Featurettes." Like behind the scenes video files.

Code: Select all

filebot -script fn:amc "%USERPROFILE%/Media" --output C:/Users/Kelleher/Videos --action move --conflict auto -non-strict --def artwork=n ut_label=Movie movieFormat="Movies/{genre}/{ny}/{plex.name}" --def clean=y
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Creating Movie Genre Directories via CLI

Post by rednoah »

No it doesn't. Do the logs say that it does?
:idea: Please read the FAQ and How to Request Help.
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Re: Creating Movie Genre Directories via CLI

Post by kelleher20 »

It most certainly has been. Only for the movies, using the script/command I listed above. The CLI script takes a few minutes to complete because it's downloading the extras.
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Creating Movie Genre Directories via CLI

Post by rednoah »

rednoah wrote:It most certainly has been.
Show me those logs. ;)

PS: FileBot most certainly does not download any video content.
:idea: Please read the FAQ and How to Request Help.
kelleher20
Posts: 11
Joined: 11 Jul 2016, 09:38

Re: Creating Movie Genre Directories via CLI

Post by kelleher20 »

Got it all figured out. Thanks.
Post Reply