Page 1 of 1

Store format result into vars in a script

Posted: 25 Jul 2019, 21:05
by tresi
Hello,

is it possible to store the resulting format value into a var/an array to use it in a custom script without doing something else?
Has filebot native support for such an approach?

At the moment I am using this (simplified) code to get all matching values into a loop or an array:

Code: Select all

filebot {CUSTOM_ARGS} --action test --format "{CUSTOM_FORMAT}" -rename "{SINGLE_FILE OR DIR}" | grep "\[TEST\]" | cut -d'[' -f4 | while read file;
      echo "$file"
do
Thanks a lot in advance.

Kind regards,
tresi

Re: Store format result into vars in a script

Posted: 26 Jul 2019, 05:21
by rednoah
I'd use the -exec option for that kind of use case:
viewtopic.php?t=5047

e.g.

Code: Select all

-exec echo {f} +

Re: Store format result into vars in a script

Posted: 26 Jul 2019, 14:26
by tresi
Simple and effective. Thanks for that.

...btw... is it possible to suppress the progress outputs from Filebot?

Re: Store format result into vars in a script

Posted: 26 Jul 2019, 14:44
by rednoah
tresi wrote: 26 Jul 2019, 14:26 ...btw... is it possible to suppress the progress outputs from Filebot?
What are you talking about specifically?


Turn on important logging only:

Code: Select all

--log INFO

Turn off all logging:

Code: Select all

--log OFF

Re: Store format result into vars in a script

Posted: 29 Jul 2019, 18:35
by tresi
:oops:

Thx!