Page 1 of 1
					
				Can you tell if command line filebot fails?
				Posted: 05 Jul 2013, 19:21
				by douglasf
				Like the subject says, can you tell if the command line version fails in any programatical way? If not it would be great if it returned 0 or 1, or anything like that. So that you could do something like this (obviously not a great example but I hope you get my point 

)
Code: Select all
res=`filebot -rename .`
if [ $res = 0 ]; then
    echo "there was an error"
else
    rm -rf .
fi
 
			 
			
					
				Re: Can you tell if command line filebot fails?
				Posted: 05 Jul 2013, 23:05
				by rednoah
				It does return -1 on error, anything that aborts the whole program flow anyway. If the input set can only partially processed that's not a cause for aborting the whole thing.
For exact error handling I'll need to write a filebot/groovy script:
http://www.filebot.net/script.html#functions
You'll have the input fileset and rename(...) will give you a set of processed File objects that you can check for integrity or error logic you want.
PS: If you wanna do any kinda scripting related to filebot, best to do it with groovy right away.
 
			 
			
					
				Re: Can you tell if command line filebot fails?
				Posted: 06 Jul 2013, 10:42
				by douglasf
				I see, but i assume that a "Fail" is not regarded as an error then because i just got the whole set of text lines in return then.
Anyway, I'll write it in groovy then, just didn't want to have unnecessary script files 
Thank you!