FileBot is free software. Please help support this project.

FileBot CLI Command-line interface usage manual

screenshot

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.

Examples

Rename

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

filebot -rename "One Piece" --db anidb Rename given episodes using AniDB episode info.

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 OpenSubtitles 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 episode/movie files media folder or episode/movie file
--db episode/movie datasource
TV Series mode: TVRage, AniDB, TheTVDB
Movie mode: OpenSubtitles, IMDb, TheMovieDB
--order episode numbering airdate | absolute | dvd
--format naming scheme movie or episode format expression
--action rename action move | copy | keeplink | symlink | hardlink
--conflict conflict resolution override | skip | fail
--filter episode include rules filter expression (e.g. "y > 2000")
-get-subtitles fetch subtitles media folder or episode/movie file
-get-missing-subtitles fetch missing subtitles media folder or episode/movie file
--q search query tv series or movie title
--lang 2-letter language code en, de, fr, es, ja, zh, etc
-non-strict use advanced matching
Rename mode: match multiple tv shows
Subtitle mode: match subtitles by name
-r handle folders recursively
-check create/check sfv file folder or sfv file
-extract extract archives folder or archive file
--output output format and/or path
Rename mode: output folder
Subtitle mode: srt (re-encode subtitles)
Checksum mode: sfv, md5, sha1
--encoding output charset UTF-8, windows-1252, GB18030, etc
-list print episode list
-mediainfo print media info
-script execute script
--log log level all, config, info, warning
-clear-cache clear cache
-clear-prefs reset application settings
-no-analytics disable analytics
-help print help message

Need some help getting started? Check the forums.