[Plain File Mode] Add missing file extensions
Posted: 19 Oct 2022, 04:30
Plain File Mode allows use to rewrite file names and add missing file extensions. In this example, we use MediaInfo Bindings to guess the media file type from the media file content.

-r ... select files from the /input folder and subfolders recursively
--format ... generate new file names based on the current file name and then use MediaInfo Bindings to guess the media file type from the file content:
--file-filter ... select files that currently do not have a file extension:
GUI:
Use the following custom format in Plain File Mode to keep the current file name and then add the media file extension at the end. You may create a custom preset for recurring tasks.Format: Select all
{ fn }{ '.' + media.FormatExtensions.tokenize().first() }

CLI:
Shell: Select all
filebot -rename -r /input --output /output --db file --format "{ fn }{ '.' + media.FormatExtensions.tokenize().first() }" --file-filter "none{ ext }"
Console Output: Select all
[MOVE] from [sample] to [sample.mkv]
-r ... select files from the /input folder and subfolders recursively
--format ... generate new file names based on the current file name and then use MediaInfo Bindings to guess the media file type from the file content:
Format: Select all
{ fn }{ '.' + media.FormatExtensions.tokenize().first() }
Groovy: Select all
none{ ext }