Hi.
I've had problem with filter argument. I tried to use it as you suggested
Code: Select all
--filter "!readLines('f:/exclude.txt').contains(n)"
but script kept throwing exceptions on me
Code: Select all
ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script10.groovy: 1: unexpected char: 0xFFFF @ line 1, column 27.
/exclude.txt').contains(n)
I've spent all night trying to figure what is wrong. Even started digging into FileBot sources for clues.
But i could not find why it wasnt working.
Turned out it was all windows fault...
I'm using FileBot in bat script and iterating through files in for loop
Code: Select all
for /r %%i in (*.*) do (
set "Filename=%%~nxi"
if {%Path1:~-1,1%}=={\} (set "Result=%Path1%!Filename!") else (set "Result=%Path1%\!Filename!")
"c:\Program Files\FileBot\filebot.exe" -script fn:amc --filter "!readLines('f:/exclude.txt').contains(n)" --output "f:" --log-file "f:\amcbt.log" --action test --conflict override -non-strict --def excludeList=amc-input.txt artwork=y subtitles=ru plex=localhost:ZwdywpegcQDhk4mWGVjV "seriesFormat=f:/TVShows/{n}/{'Season '+s}/{n.space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{t.space('.')}" "movieFormat=f:/Movies/{ny}/{n.upperInitial().space('.')}.{y}.{source}.{vc}" "musicFormat=f:/Music/{n}/{fn}" "ut_dir=!Result!" "ut_kind=multi" "ut_title=!Filename!" --lang ru
)
For that script to work i had to enable extensions
Code: Select all
setlocal enableextensions enabledelayedexpansion
You might notice !Filename! instead of %Filename%.
Yeah, so, windows interpreted exclamation mark in
Code: Select all
!readLines('f:/exclude.txt').contains(n)
as start point for variable and screwed up whole line...
So speaking of escaping, you also might need to escape ! with ^ if you have extensions enabled in script.
Maybe this info will save someones night someday.
Fixed filter now looks like this
Code: Select all
--filter "^!readLines('f:/exclude.txt').contains(n)"
P.S. I was also trying to exclude old The Magicians show
