[Plain File Mode] Offline Cleanup

How-to guides, frequently asked questions, not-so-obvious features, etc
Post Reply
User avatar
The Source
Posts: 23156
Joined: 16 Nov 2011, 08:59
Location: Taipei

[Plain File Mode] Offline Cleanup

Post by rednoah »

Plain File Mode allows us to process files based on locally available information:

Shell: Select all

filebot -rename -r /input --output /output --action hardlink --db file --format "{ fn.clean() }" --file-filter "none{ f.age > 1 }{ f.linkCount > 1 }{ f.clutter }"

Console Output: Select all

[HARDLINK] from [/input/[ONe]_Ano_Hana_01_(1280x720_DVD_AC3)_[A1B2C3D4].mkv] to [/output/Ano Hana 01.mkv]

-r ... select files from the /input folder and subfolders recursively

--format ... generate new file names based on the current file name with clutter patterns stripped away:

Format: Select all

{ fn.clean() }
--file-filter ... exclude files that are older than a day, and exclude files that have been hardlinked already, and exclude clutter files:

Groovy: Select all

none{ f.age > 1 }{ f.linkCount > 1 }{ f.clutter }
f.age ... age in days since the Last-Modified date of f
f.linkCount ... link count of f
f.clutter ... true if f is a clutter file (e.g. trailer, sample, artwork, subtitle, etc)

:idea: f.linkCount > 1 ensures that each file is only processed once, even if filebot is called on the same files multiple times.

:idea: f.age > 1 ensures that only newly added files are selected for processing, which is useful if filebot is called on the same files on a schedule.
:idea: Please read the FAQ and How to Request Help.
Post Reply