[DOCS] How do I process specific files with specific command-line options?

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 21345
Joined: 16 Nov 2011, 08:59

[DOCS] How do I process specific files with specific command-line options?

Post by rednoah »

If you use filebot on the command-line, then the --q option and --filter option and --mapper option can be used to tailor filebot to a specific known use case.



:idea: If you run an automated script, then you may want to perform different filebot commands with different options for different files. The --file-filter option can help with that by limiting a given filebot call to a specific set of files:

Code: Select all

filebot -rename -r /input --output /output --format "{plex}" --db TheMovieDB::TV --file-filter "fn =~ /Doctor.Who/" --q 57243
filebot -rename -r /input --output /output --format "{plex}" --db TheMovieDB::TV --order Absolute --file-filter "fn =~ /Firefly/" --q 01437
filebot -rename -r /input --output /output --format "{plex}" --db AniDB --file-filter "fn =~ /One.Piece/" --q 00069
...

:idea: The amc script will ignore clutter files with extreme prejudice (e.g. any file path that contains the "trailer" keyword) so we can pick those out ahead of time and process them separately:

Code: Select all

filebot -rename -r /input --output /output --format "{plex}" --db TheMovieDB::TV --order Airdate --file-filter "fn =~ /Trailer.Park.Boys/" --q 03796


:!: Note that find -iname -exec will be significantly faster than filebot --file-filter especially in cases where no such file exists (i.e. where a filebot call can be skipped) so you may prefer to use that instead on Unix platforms:

Code: Select all

find /input -type f -iname '*Doctor.Who*' -exec filebot -rename --output /output --format "{plex}" --db TheMovieDB::TV --q 57243 -- {} +
:idea: Please read the FAQ and How to Request Help.
Post Reply