How to use groovy scripts? and what is better groovy or cmd?

Any questions? Need some help?
Post Reply
earl.grey
Posts: 7
Joined: 12 Nov 2014, 15:12

How to use groovy scripts? and what is better groovy or cmd?

Post by earl.grey »

Ok,

this is propably a totally newb question but im gonna ask anyway:

How can i use the predefined groovy scripted? they look far more sophiticated as the normal cmd line scripts, so i would like to try them out, as well as you have more possibilities with them.

I worked currently with this thread:
http://www.filebot.net/forums/viewtopic.php?f=4&t=215

i totally ignored all the utorrent part and just started with:
Run from cmdline:
1) i created a .bat file in my folder structure and typed then this code in:

Code: Select all

filebot -script fn:amc --output "C:\Users\****\Downloads\Test Folder Filebot\Output" --log-file amc.log --action copy -non-strict "C:\Users\****\Downloads\Test Folder Filebot\Input" --def subtitles=en --def artwork=y --def excludeList=amc.txt
--> it worked.

but then i found out that there are (predefined) groovy scripts out there but i have no idea how i can start them. any hints?

second question:
i tried to use the windows task scheduler to automated my cmd .bat every hour. at the intervall time the cmd line slowly pops up, but then it closes directly and nothing happens... what do i do wrong?
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to use groovy scripts? and what is better groovy or

Post by rednoah »

This is a simple cmdline call. It calls filebot and tells it to run the amc script:

Code: Select all

filebot -script fn:sysinfo
The (predefined) groovy scripts can be run by filebot, filebot can be run by cmd. cmd doesn't run groovy scripts and filebot doesn't run cmd scripts. It's not a competition. :D

As for Scheduler, redirect output (including error output) to file and see what it says.
:idea: Please read the FAQ and How to Request Help.
earl.grey
Posts: 7
Joined: 12 Nov 2014, 15:12

Re: How to use groovy scripts? and what is better groovy or

Post by earl.grey »

So actually the groovy (AMC) script is:
filebot -script fn:amc
??? and since its taken remote from your servers i dont see them?

If thats the case why do i have to add then manually

Code: Select all

--def subtitles=en --def artwork=y
for example to get subtitles? shouldnt it be already included in the AMC groovy script? When i just run

Code: Select all

filebot -script fn:amc --output "C:\Users\****\Downloads\Test Folder Filebot\Output" --log-file amc.log --action copy -non-strict "C:\Users\****\Downloads\Test Folder Filebot\Input" --def excludeList=amc.txt
it does not take subtitles or artworks

EDIT: i downloaded the amc.groovy file from github and

Code: Select all

filebot -script C:\Users\*****\Downloads\Test Folder Filebot\amc.groovy
--> didnt work

If my understanding is totally wrong how for example can i run this script with filebot? (it has extract rars, ignore par files and other cool stuff)

https://github.com/filebot/scripts/blob ... rty.groovy

Edit: I tried to replace fn:amc with fn:sorty but it didnt work

rednoah wrote:As for Scheduler, redirect output (including error output) to file and see what it says.
how do i do that? the only command what i found was --def reportError=y , but this one is propably not the one you mean
User avatar
rednoah
The Source
Posts: 23003
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to use groovy scripts? and what is better groovy or

Post by rednoah »

1.
--def subtitles=en --def artwork=y are options for the script.

2.
You just don't know how to use cmd => viewtopic.php?f=4&t=1899

3.
The amc script can be run from online, for the sorty script that doesn't make sense at all. If you want to use the sorty script you need to have at least some basic programming skills. But why would you?

4.
--def reportError=y is an option for the amc script, not a command.


You're welcome to try and learn how to use the cmdline. But considering your understanding / or misunderstanding for the existing docs I recommend sticking to the GUI.

@see viewtopic.php?f=8&t=1558
:idea: Please read the FAQ and How to Request Help.
earl.grey
Posts: 7
Joined: 12 Nov 2014, 15:12

Re: How to use groovy scripts? and what is better groovy or

Post by earl.grey »

Hi thanks for your feedback.

I dont really want to use the groovy scripts and it pretty much works for me how i decribed it above. the only think is that i did not found a option for the script for deleting the processed files. after i processed them.

and secondly i want to start the script on every boot. this should easly work with windows task scheduler, but as stated above it didnt work for me.

if this two things work, im pretty much happy with it. :)
Post Reply