Page 1 of 1

--output read incorrectly

Posted: 15 Jan 2024, 00:02
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!

Re: --output read incorrectly

Posted: 15 Jan 2024, 07:22
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.

Re: --output read incorrectly

Posted: 15 Jan 2024, 22:30
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 ¯\_(ツ)_/¯

Re: --output read incorrectly

Posted: 15 Jan 2024, 23:15
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.