--output read incorrectly

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

--output read incorrectly

Post by IAmBroom »

My filebot call, from a Batch/Cmd file:

Code: Select all

filebot -script fn:amc --action duplicate --output "D:\Torrents\Filebot_Output" --conflict index -non-strict --log-file Filebot.log --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D" unsorted=y seriesFormat="%MySeriesFormat%"
The line immediately after Filebot.log lists all the input parameters to Filebot:
File does not exist: C:\Windows\System32\D\F
In other slight variations, it has claimed
File does not exist: C:\Windows\System32\'D:\Torrents\Filebot_Output'
so I'm pretty sure the \D\F in the first error message is also attempting to concatenate the output parameter onto a default string of "C:\Windows\System32\".

I'm stumped. I've been trying to get the grammar right for this for a couple days now. Help, please!
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --output read incorrectly

Post by rednoah »

:?: What does the complete console output say?


:?: You'll want to use the sysenv script for debugging. It'll show you the argument values that you are passing in:

Shell: Select all

filebot -script fn:sysenv --log-file C:/Logs/filebot.log ...

:!: Your command looks good to me at a glance. The root cause is likely your custom code, so I'd remove that, run a test and see what happens:

Shell: Select all

seriesFormat="%MySeriesFormat%"



:!: CMD is strange and complex, and sometimes plain dumb. You notably cannot use '...' to quote arguments. Cmdline and Argument Passing may not always work the way you think it should work. You'll want to do your own trial and error testing. You'll want to start small, build up a longer command-line step by step, run tests every step of the way. Do not fiddle around with a long and complex command-line all at once.


:!: If you're using %D in a CMD script then that suggest that you don't understand how qBT works and didn't read the manual. Please read Automated Media Center › Troubleshooting carefully. Ask if you still don't understand after reading the manual. Notably, this section teaches you how to completely avoid CMD and still maintain arguments via an external text file. Avoiding CMD is always smart.
:idea: Please read the FAQ and How to Request Help.
IAmBroom
Posts: 16
Joined: 18 Jan 2016, 18:44

Re: --output read incorrectly

Post by IAmBroom »

What does the complete console output say?
Run script [fn:amc] at [Sun Jan 14 21:18:47 EST 2024]

[PSA] Important Discussion of Changes effective as of 28 Apr 2023:
viewtopic.php?t=13406

Parameter: ut_label = L
Parameter: ut_state = S
Parameter: ut_title = N
Parameter: ut_kind = K
Parameter: ut_file = F
Parameter: ut_dir = D
Parameter: seriesFormat = {n.ascii().removeAll(:?).sortName()}\{n.ascii().removeAll(:?).sortName()} - {sxe} {airdate} {t.ascii().removeAll(:?).sortName()}
File does not exist: C:\Windows\System32\D\F
No files selected for processing
Done ¯\_(ツ)_/¯
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --output read incorrectly

Post by rednoah »

The format being invalid in places where we would expect some quotes, e.g. removeAll(:?), so that strongly suggests that you are not quoting things correctly in your CMD script, so things go awry from there. See Cmdline and Argument Passing for details.


:arrow: Avoid CMD. No need to use CMD. Life it too precious to understand how CMD works. Just read Automated Media Center › Troubleshooting and use @file syntax for reading command-line arguments from external text files:

Shell: Select all

filebot @X:/args.txt --def "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
NOTE: This thread assumes that you're are using qBT. You didn't say so but the %L %S %N %K %F %D variables suggest as much.
:idea: Please read the FAQ and How to Request Help.
Post Reply