FileBot 4.5 (r2578) / Java(TM) SE Runtime Environment 1.8.0_20
The GUI and uTorrent script work fine. When I try to run my watch folder script, I receive an error.

I have my script in a batch file that is set to start whenever the computer is restarted. It works fine in Filebot 4.2.
Code: Select all
def watchman = args[0].watch { changes ->
execute('''filebot -script fn:amc -non-strict --output "E:/" "G:/Watched" --log-file amc.log --action move --conflict auto --def "seriesFormat={['E:', 'F:', 'G:', 'H:'].collect{ drive -> def a=n; return new File(drive+'/TV/', a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode.special ? 'Season '+s.pad(2) : 'Season '+s.pad(1)}/{s00e00} {t}" \"movieFormat={['E:', 'F:', 'G:', 'H:'].collect{ new File(it+'/Movies/'+any{collection+'/'}{''}) }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\\s(.+)/, /$2, $1/)} {fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':''}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, ' ') + ')'} ({y}) {[vf]}/{n}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':''}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, ' ') + ')'} ({y})\" \"musicFormat=Music/{n}/{\$album/}{\${pi.pad(2)}. } {t}\" --def plex=localhost --def clean=y --def deleteAfterExtract=y''')
}
watchman.commitDelay = 5 * 1000
watchman.commitPerFolder = false
println "Waiting for events"
if (console) { console.readLine() } else { sleep(Long.MAX_VALUE) } // keep running and watch for changes