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

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

[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:

Shell: 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: If your movie files and episode files are mixed up in the same folder, then you may want to select and process them separately with different filebot commands:

Shell: Select all

filebot -rename -r /input --output /output --file-filter "f.episode" --db TheMovieDB::TV --format "TV Shows/{n}/{n} {s00e00} {t}"
filebot -rename -r /input --output /output --file-filter "none{ f.episode }" --db TheMovieDB --format "Movies/{ny}"


: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:

Shell: 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:

Shell: 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