Page 1 of 1

Syntax Padding Error

Posted: 05 Jul 2017, 17:32
by fragger
Hi All,

Hope someone can help. I am getting the below syntax error when running the below command.

syntax error near unexpected token `('

filebot -rename old/Season01/* --db TheTVDB --action copy --output new/ --format {n}/Season{s.pad(2)}/{n}.{s00e00}.{t}

The funny thing is, if I remove the () then the command runs fine even if I enter random letters to replace the brackets. The padding of coarse, does not work though.

Thanks in advance.

Re: Syntax Padding Error

Posted: 05 Jul 2017, 17:50
by fragger
Fixed my own problem.

Left out "" on the format section, so for completeness here is the comparison:

Old: filebot -rename old/Season01/* --db TheTVDB --action copy --output new/ --format {n}/Season{s.pad(2)}/{n}.{s00e00}.{t}

New:filebot -rename old/Season01/* --db TheTVDB --action copy --output new/ --format "{n}/Season{s.pad(2)}/{n}.{s00e00}.{t}"

Re: Syntax Padding Error

Posted: 06 Jul 2017, 04:41
by rednoah
(...) probably has special meaning in your shell, so correctly quoting arguments is important. Please read Cmdline and Argument Passing. ;)


:idea: Use the @file syntax for reading command-line arguments from external text files.