Shell: Select all
filebot -find /path/to/input --filter 'f.video && f.metadata' --apply '{ source, target -> target.dir.listFiles{ it.isDerived(f) }*.metadata = target.metadata }'
--filter expression to select video files that have xattr metadata:
Groovy: Select all
f.video && f.metadata
--apply script to copy xattr metadata to derived-by-name companion files:
Groovy: Select all
{ source, target ->
target.dir.listFiles{ it.isDerived(f) }*.metadata = target.metadata
}
Alternatively, the same can be accomplished with filebot -script and a standalone custom script:
Shell: Select all
filebot /path/to/input -script /path/to/copy-metadata.groovy
Groovy: Select all
args.files.each{ f ->
if (f.video && f.metadata) {
f.dir.listFiles{ it.isDerived(f) }*.metadata = f.metadata
}
}