FileBot CLI Command-line interface usage manual

FileBot command-line tools

About

FileBot can be called with a set of command-line arguments directly from the console or in scripts for automation running tasks like renaming TV shows and movies, fetching subtitles or checking SFV files.

The CLI is designed for simple tasks. Please have a look at Scripts and Automation for something more powerful and find scripts for many common tasks here.

Examples

Rename

filebot -rename path/to/episodes Rename given episodes or movies.

filebot -rename "One Piece" --db anidb -non-strict Rename given episodes using AniDB episode info. Enable comprehensive Episode/File matching.

filebot -rename "Generation Kill" --format "{n} E{e} [{t}]" -non-strict Rename given episodes according to the given format. Enable comprehensive Episode/File matching.

filebot -rename "1x01.avi" --q "Dexter" --db TheTVDB --lang de Rename a single episode forcing the series name. Use German language episode info.

filebot -rename "movie.avi" --q "Avatar" --db TheMovieDB Rename a single movie looking up movie info via file hash or using the given movie title.

Keep in mind that the CLI is strict by default so it will never mess up your files. In some cases you may need to enable -non-strict for more opportunistic matching like the GUI does.

Fetch Subtitles

filebot -get-missing-subtitles path/to/episodes Fetch subtitles that are missing for the given files. Lookup matching subtitles via file hash only.

filebot -get-subtitles path/to/movie --q "Avatar" --lang zh --output srt --encoding utf8 -non-strict Fetch subtitles and force output format. Lookup subtitles via file hash or given search query.

File Verification

filebot -check path/to/files Compute SFV file and automatically determine output file.

filebot -check path/to/files --output checksum.md5 Compute checksums and write to the given output file.

filebot -check path/to/checksum.md5 Check file integrity using the given checksum file.

Scripting

filebot -extract "300.part01.rar" --output path/to/folder Extract files from single-volume or multi-volume archives (e.g. rar).

filebot -list --db thetvdb --q Dexter --format "{s}x{e.pad(2)} {t}" Fetch episode list and print to console.

filebot -mediainfo path/to/files --format "{fn} {resolution} {vc} {af}" Read media info and print to console.

filebot -script "path/to/script.groovy" args... Execute a given Groovy script. Find the manual on scripting here.

Argument Reference source

Name Description Usage
-rename rename media files media folder or media file
--db database
Series mode: TheTVDB, AniDB
Movie mode: TheMovieDB, OMDb
Music mode: AcoustID, ID3
--order episode numbering airdate | absolute | dvd
--format naming scheme format expression
--action rename action move | copy | keeplink | symlink | hardlink
--conflict conflict resolution override | skip | index | fail
--filter match filter rules filter expression (e.g. y > 2000)
-get-subtitles fetch missing subtitles media folder or video file
--q search query force movie or series name
--lang 2-letter language code en, de, fr, es, ja, zh, ...
-non-strict opportunistic match mode
Rename mode: required for tricky filenames
Subtitle mode: enable fuzzy search
-r traverse folders recursively
-check create or check sfv file folder or sfv file
-extract extract archives folder or archive file
--output output format or path
Rename mode: output folder
Subtitle mode: srt (enable transcode non-srt subtitles)
Checksum mode: sfv, md5, sha256
--encoding output charset UTF-8, Windows-1252, GB18030, ...
-list print episode list
-mediainfo print media info
-script execute script
--log log level all, fine, info, warning, off
-clear-cache clear cache
-clear-prefs reset application settings
-no-xattr disable extended attributes
-version print version
-help print usage

Need some help getting started? Check the forums.