[bash] FileBot Command-Line Examples

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 14647
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[bash] FileBot Command-Line Examples

Post by rednoah » 26 Feb 2017, 19:36

Call filebot with many files:

Code: Select all

find . -type f -iname '*.mp4' -exec filebot -script fn:sysenv {} +
Call filebot for each folder:

Code: Select all

find . -type d -exec filebot -rename -non-strict {} ';'
Rename files and episodes in linear order:

Code: Select all

filebot -list --q Firefly --filter regular --format {plex.name} -rename *.mp4
Create empty test files:

Code: Select all

filebot -list --q Alias --filter regular --format {plex.name}.mp4 --log OFF | tr '\n' '\0' | xargs -0 touch
Set the Last Modified Date for each media file to the episode airdate or movie release date:

Code: Select all

filebot -mediainfo -r . --format "touch -t {d.format 'YYYYMMdd0000'} {quote f}" | sh -x
Create new structure with Jackie Chan movies:

Code: Select all

filebot -rename -r . --db xattr --action hardlink --output 'Jackie Chan' --filter 'actors =~ /Jackie Chan/'
Create new structure by genre:

Code: Select all

filebot -rename -r . --db xattr --action hardlink --output 'By Genre' --filter genre --format {genre}/{plex.name}
Create new structure by director:

Code: Select all

filebot -rename -r . --db xattr --action hardlink --output 'By Director' --filter director --format {director}/{plex.name}
Move old movies:

Code: Select all

filebot -rename -r . --db xattr --output 'Old Movies' --filter 'movie && y < 1970'
Copy recently aired episodes:

Code: Select all

filebot -rename -r . --db xattr --action copy --output /Volumes/USB --filter 'episode && age < 30'
List Science Fiction movies:

Code: Select all

filebot -mediainfo -r . --filter 'genres =~ /Science Fiction/' --format {f}
Delete non-English subtitles:

Code: Select all

filebot -mediainfo -r . --filter 'f.subtitle && !(lang =~ /eng/)' --format {f} | xargs -I % rm -v %
Rename and organize photos by date taken:

Code: Select all

filebot -rename *.jpg --db xattr -non-strict --filter exif --format "{dt.format 'yyyy/yyyy-MM-dd HH∶mm∶ss'}"
Organize photos by year:

Code: Select all

filebot -rename *.jpg --db xattr -non-strict --filter exif --format {y}/{fn}
Organize photos by camera:

Code: Select all

filebot -rename *.jpg --db xattr -non-strict --filter camera --format {camera.model}/{fn}
Organize photos by country:

Code: Select all

filebot -rename *.jpg --db xattr -non-strict --filter location --format {location.country}/{fn}
View xattr metadata for each file:

Code: Select all

filebot -mediainfo -r . --format {json}
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests