Illegal usage: use either script parameters [...] or file arguments [....]

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
virtualfrancky
Posts: 22
Joined: 07 Aug 2018, 19:07

Illegal usage: use either script parameters [...] or file arguments [....]

Post by virtualfrancky » 07 Oct 2018, 09:34

Ok I have this problem I can resolve

Here is the error

Code: Select all

Illegal usage: use either script parameters [dir:£ARG_PATH, kind:multi, title:Nirvana] or file arguments [Unplugged, DVDRIP, H264, DTS, AC3-FwD.mkv, ut_label=movie] but not both
The part of the script concern is this :

Code: Select all

elif [ "$ARG_LABEL" = concert ];
        then
                filebot -script fn:amc $CONFIG_INPUT --log-file amc.log --output $CONFIG_OUTPUT --action hardlink --conflict skip -non-strict --def unsorted=n music=n artwork=n excludeList=/home/francky/.bin/.excludes --def subtitles=fr ut_dir="£ARG_PATH" ut_kind=multi ut_title=$ARG_NAME ut_label=movie --def subtitles=fr -get-subtitles --def movieFormat="concert/{n} ({y})/{n} ({y}) {lang} {vf} {VC}" &
the full log is this :

Code: Select all

Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/Unplugged (Unplugged)
Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/DVDRIP (DVDRIP)
Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/H264 (H264)
Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/DTS (DTS)
Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/AC3-FwD.mkv (AC3-FwD.mkv)
Illegal Argument: java.nio.file.NoSuchFileException: /home/francky/ut_label=movie (ut_label=movie)
Run script [fn:amc] at [Sun Oct 07 11:25:56 CEST 2018]
Parameter: unsorted = n
Parameter: music = n
Parameter: artwork = n
Parameter: excludeList = /home/francky/.bin/.excludes
Parameter: subtitles = fr
Parameter: ut_dir = £ARG_PATH
Parameter: ut_kind = multi
Parameter: ut_title = Nirvana
Parameter: movieFormat = concert/{n} ({y})/{n} ({y}) {lang} {vf} {VC}
Argument[0]: File does not exist: Unplugged
Argument[1]: File does not exist: DVDRIP
Argument[2]: File does not exist: H264
Argument[3]: File does not exist: DTS
Argument[4]: File does not exist: AC3-FwD.mkv
Argument[5]: File does not exist: ut_label=movie
Illegal usage: use either script parameters [dir:£ARG_PATH, kind:multi, title:Nirvana] or file arguments [Unplugged, DVDRIP, H264, DTS, AC3-FwD.mkv, ut_label=movie] but not both
Failure (°_°)
My goal it to move the file with the label "concert" from rtorrent to a directory /concert/ using the movieFormat. My file is forced as a movie, but the error avoid it to be transfert where it should be.

User avatar
rednoah
The Source
Posts: 16998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Illegal usage: use either script parameters [...] or file arguments [....]

Post by rednoah » 07 Oct 2018, 13:36

1.
Using £ instead $ is pretty funny... I recommend starting with a bash tutorial.

NO:

Code: Select all

--def ut_dir="£ARG_PATH" 
YES:

Code: Select all

--def ut_dir="$ARG_PATH" 


2.
The command that is being executed is completely wrong since you're not quoting arguments correctly:
viewtopic.php?f=4&t=1899

NO:

Code: Select all

--def ut_title=$ARG_NAME
YES:

Code: Select all

--def ut_title="$ARG_NAME"
:idea: Please read the FAQ and How to Request Help.

virtualfrancky
Posts: 22
Joined: 07 Aug 2018, 19:07

Re: Illegal usage: use either script parameters [...] or file arguments [....]

Post by virtualfrancky » 07 Oct 2018, 13:43

Oh SHIT, I have look at the code I dont know how many times, and I completly missed the 1st mistake, sometimes 4 eyes are better than 2.
Thanks a lot.

Post Reply