[DOCS] How do I process input files in a specific order?
Posted: 03 Jul 2023, 05:35
(requires FileBot r9858 or higher) By default, filebot will process files in input argument order. The --file-order option can be used to process files in a different order.
e.g. order by video height from highest to lowest:
e.g. order by video duration from shortest to longest:
The --file-order option uses descending order by default. Use ^ to switch to ascending order.
e.g. order by file creation date from newest to oldest:
e.g. order by file size from largest to smallest:
e.g. order by height first, then by creation date second, in descending order:
e.g. order by video height from highest to lowest:
Shell: Select all
--file-order "height"
Console Output: Select all
$ filebot -mediainfo -r /input --file-order "height" --format "{fn} | {resolution} | {vcf}"
B | 1920x1080 | AVC
C | 1920x1080 | HEVC
A | 480x360 | MPEG-4 Visual
e.g. order by video duration from shortest to longest:
Shell: Select all
--file-order "^duration"
Console Output: Select all
$ filebot -mediainfo -r /input --file-order "^duration" --format "{fn} | {resolution} | {vcf} | {hours}"
A | 480x360 | MPEG-4 Visual | 0∶01
C | 1920x1080 | HEVC | 0∶25
B | 1920x1080 | AVC | 1∶05

e.g. order by file creation date from newest to oldest:
Shell: Select all
--file-order "ct"
Console Output: Select all
$ filebot -mediainfo -r /input --file-order --file-order "ct" --format "{fn} | {resolution} | {vcf} | {ct}"
C | 1920x1080 | HEVC | 2023-01-01T00:00:00Z
B | 1920x1080 | AVC | 2022-01-01T00:00:00Z
A | 480x360 | MPEG-4 Visual | 2017-01-01T00:00:00Z
e.g. order by file size from largest to smallest:
Shell: Select all
--file-order "bytes"
Console Output: Select all
$ filebot -mediainfo -r /input --file-order --file-order "bytes" --format "{fn} | {resolution} | {vcf} | {bytes}"
B | 1920x1080 | AVC | 4.4 GB
C | 1920x1080 | HEVC | 1.1 GB
A | 480x360 | MPEG-4 Visual | 14 MB
e.g. order by height first, then by creation date second, in descending order:
Shell: Select all
--file-order "[height, ct]"
Console Output: Select all
$ filebot -mediainfo -r /input --file-order "[height, ct]" --format "{fn} | {resolution} | {vcf} | {ct}"
C | 1920x1080 | HEVC | 2023-01-01T00:00:00Z
B | 1920x1080 | AVC | 2022-01-01T00:00:00Z
A | 480x360 | MPEG-4 Visual | 2017-01-01T00:00:00Z