Argument List
FileBot allows you specify argument files via @/path/to/file syntax, so you can pass in your complex command-line arguments via separate text files line by line without having to worry about quoting or escaping anything.e.g. pass all arguments via an external text file:
Shell: Select all
filebot @/path/to/args.txt
Console Output: Select all
$ cat args.txt
-script
fn:amc
/input
--output
/output
--action
duplicate
--def
movieFormat=Movies/{ny}/{fn}
seriesFormat=TV/{n}/{'S'+s}/{fn}
animeFormat=Anime/{n}/{fn}
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
Option Value
The --format, --mapper, --filter and --file-filter options accept Groovy expressions literally, or as *.groovy UTF-8 encoded plain text files:Shell: Select all
--format /path/to/MovieFormat.groovy
Script Parameter Value
You may also pass --def script binding values via UTF-8 encoded plain text files. That's handy when passing in complex multi-line formats.e.g. pass --def name=value parameter value via an external text file:
Shell: Select all
filebot -script fn:amc /input --output /output --def movieFormat=@/path/to/MovieFormat.groovy
Format: Select all
Movies/{
[ allOf {ny}
{ allOf {vf}
{group}
}
, allOf {ny}
{'CD'+pi}
{lang}
]*.findResults {
if (it) it.toString()
.replaceAll(/[!?.]+$/)
.asciiQuotes()
}*.join(' ')
.join('/')
}
Format Value
The format value itself allows for another level of redirection that is applicable to both GUI and CLI usage, so you can use the same @format.groovy syntax in both GUI and CLI.e.g. include code from an external *.groovy text file at compile time:
Format: Select all
@/path/to/format.groovy
![Screenshot](https://i.imgur.com/VpuACtF.png)