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 commands that do one thing and do it well.
Please read Scripts and Automation if you need more advanced behaviours. Find shared scripts for many common tasks in the Script Repository.
Examples
Rename
filebot -rename *.mkv
Rename given episode files or movie files.
filebot -rename *.mkv --db AniDB -non-strict
Rename given episode files using AniDB episode listing.
filebot -rename -r "/path/to/files" --format "{s} - {s00e00} - {t}"
Rename given episode files using the given custom format.
filebot -rename "1x01.mkv" --q "Firefly" --db TheMovieDB::TV --lang German
Rename a given episode file forcing a given series based on German language episode listing.
filebot -rename A.mkv --q 19995 --db TheMovieDB
Rename a given movie file using the numeric ID to lookup the movie information.
filebot -rename -r "/input" --db TheMovieDB -non-strict \
Clone movie files into a new {plex} file and folder structure.
--action duplicate --output /output --format "{plex.id}"
filebot -rename -r "/input" --db TheMovieDB::TV -non-strict \
Clone TV series episode files into a new {plex} file and folder structure.
--action duplicate --output /output --format "{plex.id}"
The GUI uses opportunistic matching by default. However, the filebot command is strict by default to avoid mismatches. You may need to set -non-strict depending on the files at hand.
Fetch Subtitles
filebot -get-subtitles -r "/path/to/files" -non-strict
Fetch missing subtitles for the given episode files or movie files.
filebot -get-subtitles -r "/path/to/files" -non-strict \
Fetch missing Chinese language subtitles and convert them to SubRip format and UTF-8 encoding.
--lang zh --output srt --encoding utf-8
File Verification
filebot -check "/path/to/files"
Compute CRC32 checksums and create an SFV file.
filebot -check "/path/to/files" --format SHA-256
Compute SHA-256 hashes and create an sha256sum file.
filebot -check *.sfv
Check file integrity for all the files listed in the given SFV file.
Scripting
filebot -extract -r "/input" --output "/output"
Extract all archives from the given input folder to the given output folder.
filebot -list --q "Firefly" --db TheMovieDB::TV \
Fetch episode list and print episode information for the selected episodes.
--filter "s == 1" \
--format "{id} | {s} | {y} | {sxe} | {t}"
filebot -mediainfo -r "/path/to/files" \
Read media info and print to console.
--filter "f.video && minutes > 15" \
--format "{vc} | {vf} | {ac} | {af} | {bitrate} | {bytes} | {f}"
filebot -script *.groovy "/input" --def a=1 b=2 c=3 ...
Execute a given Groovy script and pass along input arguments and script parameters.
filebot -script fn:amc "/input" --output "/output" --action duplicate \
Execute the amc script with the given input arguments, options and script parameters.
-non-strict --log-file amc.log --def excludeList="amc.txt"
Argument Reference source
Name | Description | Usage | ||||||
---|---|---|---|---|---|---|---|---|
-rename | rename media files | media folder or media file | ||||||
--db | database |
|
||||||
--order | episode numbering | Airdate | Absolute | DVD | Date and Title | ||||||
--format | naming scheme | format expression | ||||||
--action | rename action | move | copy | symlink | hardlink | test | ||||||
--conflict | conflict resolution | skip | replace | auto | index | fail | ||||||
--filter | match filter | filter expression | ||||||
--mapper | episode mapper | mapper expression | ||||||
--q | manual lookup | query expression | ||||||
--lang | language code | English | French | German | Chinese | etc | ||||||
-non-strict | opportunistic match mode |
|
||||||
-r | select files recursively | |||||||
-d | rename folders | |||||||
--file-filter | input file filter | file filter expression | ||||||
--output | output path |
|
||||||
--apply | apply post-processing | artwork | nfo | date | import | prune | ||||||
-exec | execute command | exec expression | ||||||
-extract | extract archives | folder or archive file | ||||||
-check | compute or verify hashes | folder or verification file | ||||||
-get-subtitles | fetch missing subtitles | media folder or video file | ||||||
--encoding | output charset | UTF-8 | Windows-1252 | GB18030 | etc | ||||||
-list | print episode list |
|
||||||
-find | print file paths |
|
||||||
-mediainfo | print media info | |||||||
-script | run script | |||||||
-revert | undo rename operations | |||||||
--mode | interactive | enable console-interactive mode | ||||||
--log | log level | all | fine | info | warning | ||||||
-clear-cache | clear cache | |||||||
-clear-prefs | reset application settings | |||||||
-clear-history | reset history | |||||||
-unixfs | disable file path validation | |||||||
-no-xattr | disable extended attributes | |||||||
-no-probe | disable media parser | |||||||
-no-history | disable history | |||||||
-version | print version | |||||||
-help | print usage |