How do I process only specific kinds of files?
Posted: 13 Oct 2016, 10:55
FileBot will always load all the media files from the selected folder (i.e. video files, subtitle files, image files, audio files, etc) but what if we only want to process video files and ignore all other files?


e.g. Includes: video files
e.g. Includes: files that are not *.jpg or *.png files and do not match *sample* or *trailer* in the file name and do not match *Extras* or *Featurettes* in the file path:
e.g. Includes: files that have not yet been processed, i.e. files that do not have xattr metadata and are not recorded in the local history yet:
e.g. select only video files:
e.g. select only episode files:
e.g. select only movie files:
e.g. select only files that have not already been hardlinked:
Please read How do I process specific files with specific command-line options? for details and examples.
e.g. find *.mkv files and pass them on to the filebot call as arguments:
Option 1: FileBot Filter
Drop your folders into the Filter panel and let FileBot categorize files by file type, and then use the Send to ⏵ Rename or drag-n-drop to add only the selected files to the Rename ➔ Original Files list.
Option 2: Use Windows Explorer or Mac Finder
Rather than dropping folders as whole, you can select and drop only selected files instead. Search for the files you want (e.g. search for *.mkv in Windows Explorer or kind:video in Mac Finder) and then select all the files and drag-n-drop them into FileBot.
Option 3: Use Presets with Includes
Presets allow you to set a default folder from which files are loaded and file filter expressions that allow you to include or exclude files.e.g. Includes: video files
Groovy: Select all
f.video
Groovy: Select all
none{ ext =~ /jpg|png/ }{ fn.match(/sample|trailer/) }{ folder.path.match(/Extras|Featurettes/) }
Groovy: Select all
none{ historic.f || f.metadata }
Option 4: Start FileBot with --file-filter from Terminal
Power Users may use the --file-filter option to select specific files using a custom Groovy expression.e.g. select only video files:
Shell: Select all
filebot -rename -r "/path/to/files" --file-filter "f.video"
Shell: Select all
filebot -rename -r . --file-filter "f.episode" --db TheMovieDB::TV
Shell: Select all
filebot -rename -r . --file-filter "none{ f.episode }" --db TheMovieDB
Shell: Select all
filebot -rename -r /input --file-filter "f.linkCount == 1" --action hardlink --db xattr --output /output --format "{plex.id}"

Option 5: Start FileBot with file arguments from Terminal
Power Users on Linux or macOS may prefer to use standard Linux tools to select files and pass them on to FileBot.e.g. find *.mkv files and pass them on to the filebot call as arguments:
Shell: Select all
find /path/to/files -type f -iname "*.mkv" -exec filebot -rename {} +