[DOCS] find -exec
Posted: 29 May 2021, 17:25
filebot -find is a powerful replacement for find and find -exec that works on all platforms.
e.g. find short video files:
e.g. find short videos and then scp them to a remote server with new shell-friendly file names:
{f} ... file path
{fn} ... file name without extension
.ascii() ... transliterate to ASCII
.clean() ... remove brackets
.space('_') ... replace whitespace with underscore
{ext} ... file extension
The --file-order option can be used to process files in a specific order (e.g. Last-Modified time in descending order) instead of input argument order:
filebot -find -exec will abort the entire process as soon as a single -exec command fails. The -non-strict flag can be used to ignore the exit code of each of the -exec commands and continue the process regardless of the success or failure of of any one single -exec command:
filebot -find and filebot -mediainfo -r . --format {f} are functionally equivalent.
e.g. find short video files:
Shell: Select all
filebot -find --filter "f.video && minutes < 15"e.g. find short videos and then scp them to a remote server with new shell-friendly file names:
Shell: Select all
filebot -find --filter "f.video && minutes < 15" -exec scp {f} "user@host:/volume1/videos/{fn.ascii().clean().space('_')}.{ext}"{fn} ... file name without extension
.ascii() ... transliterate to ASCII
.clean() ... remove brackets
.space('_') ... replace whitespace with underscore
{ext} ... file extension
Options
Shell: Select all
--file-order "ct"Shell: Select all
-non-strictNotes