Syntax Padding Error

All about user-defined episode / movie / file name format expressions
Post Reply
fragger
Posts: 2
Joined: 05 Jul 2017, 07:38

Syntax Padding Error

Post 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.
fragger
Posts: 2
Joined: 05 Jul 2017, 07:38

Re: Syntax Padding Error

Post 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}"
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Syntax Padding Error

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply