Invalid usage: output folder must exist and must be a writable directory: F:\"

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
rrands1
Posts: 2
Joined: 04 Dec 2021, 00:03

Invalid usage: output folder must exist and must be a writable directory: F:\"

Post by rrands1 »

OK - this has been broken for a long time (for me), but just getting around to fixing it! :S

I am using uTorrent and FileBot to move completed downloads to one of 2 folders (TV or MOVIES), and until it quit, it had been working great! For some reason it quit, and I am not good enough at understanding the command syntax to get it to work, so hoping someone can help, please!!

Setup:
uTorrent is on a separate VM, with a mapped drive (F:) to \\192.168.1.10\d$\torrents
There are 3 directories under that UNC share:
InProcessTorrents (temp storage for uTorrent to use while downloading)
Movies (Movies should get moved here automatically after download finishes)
TV Shows (TV Shows should get moved here automatically after download finishes)

uTorrent setup:
In "Run this program when a torrent finishes", I have the following:

Code: Select all

"C:\Program Files\FileBot\filebot.launcher.exe" -script fn:amc --output "F:\" --action move -non-strict -no-xattr --log-file "F:\InProcessTorrents\amc.log" --filter "any{episode; age < 9092}{true}" --def "@F:/InProcessTorrents/amc_args.txt" "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
AMC file contents:

Code: Select all

	ut_state_allow=11
	unsorted=n
	music=n
	artwork=n
	extras=n
	skipExtract=y
	clean=y
	seriesFormat=F:/TV Shows/{n.sortName('$2, $1').replaceTrailingBrackets()}/{s00e00} {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’?]/, "'").lowerTrail()}
	movieFormat=F:/Movies/{n.sortName('$2, $1').lowerTrail()} ({y}) {vf} {ac.replace('AC3','DD')}{af.replace('6ch','5.1').replace('2ch','2.0')}
It is not saving the output to the logfile I would expect it to (F:\InProcessTorrents\AMC.log. Not sure what's going on there - I believe it has rights to that directory (full access).

And in the Install folder, on the uTorrent machine, there is a file called lock.log, which says:

Code: Select all

age: No Such File: C:\Windows\system32\age
<: No Such File: Illegal char <<> at index 0: <
9092}{true} --def @F:/InProcessTorrents/amc_args.txt ut_label= ut_state=5 ut_title=Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG[TGx] ut_kind=multi ut_file=Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG.mkv ut_dir=\\192.168.1.10\d$\torrents\InProcessTorrents\Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG[TGx]: No Such File: Illegal char <:> at index 20: 9092}{true} --def @F:/InProcessTorrents/amc_args.txt ut_label= ut_state=5 ut_title=Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG[TGx] ut_kind=multi ut_file=Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG.mkv ut_dir=\\192.168.1.10\d$\torrents\InProcessTorrents\Diary.of.a.Wimpy.Kid.2021.720p.DSNP.WEBRip.400MB.x264-GalaxyRG[TGx]

Invalid usage: output folder must exist and must be a writable directory: F:\" --action move -non-strict -no-xattr --log-file F:\InProcessTorrents\amc.log --filter any{episode;

Invalid usage: no input


Anyway - if you anyone has seen this or knows what is wrong and can help, I would really appreciate it!


-randy
User avatar
rednoah
The Source
Posts: 20496
Joined: 16 Nov 2011, 08:59

Re: Script not working from uTorrent

Post by rednoah »

rednoah wrote: 01 Aug 2012, 13:04 Image

Common Problems
  • Location of Downloaded Files (--output) must not end with backslash \ because the value gets passed through via the %D variable, and so the final backslash \ will escape the double-quote " and mess up everything. Please use / as separator and not \ because the latter is also used to escape characters. (see Cmdline and Argument Passing)
  • You must not use the filesystem root (e.g. X:\ or /) as input or --output folder.
The argument sequence breaks because you write \" which escapes the " and so Windows continues to interpret what comes after as single argument, until it finally encounters an unescaped " later on:

Code: Select all

--output "F:\"

Code: Select all

Invalid usage: output folder must exist and must be a writable directory: F:\" --action move -non-strict -no-xattr --log-file F:\InProcessTorrents\amc.log --filter any{episode;
(This also results in --log-file not being passed in as option at all, and so filebot defaults to writing logs to the default log file.)



:arrow: The solution is to do F: or F:/Media instead:

Code: Select all

--output "F:"

Code: Select all

--output "F:/Media"


:!: Avoid \ on the command-line because it has special meaning. You can usually use / instead, as \ and / are pretty much interchangeable nowadays even on Windows. Please read Cmdline and Argument Passing for details.
:idea: Please read the FAQ and How to Request Help.
rrands1
Posts: 2
Joined: 04 Dec 2021, 00:03

Re: Script not working from uTorrent due to --output "F:\"

Post by rrands1 »

That was it - thank you so much!!
Post Reply