Page 1 of 1

New post-unrar scripting support in 6.50.

PostPosted: Thu Mar 28, 2013 7:17 pm
by Quade
New in 6.50 is post-unrar scripting support.

1 - In the options, you specify which file you want to run after the unrar. I've only tested CMD files but, exe files should work too. The script has to live in the scripts folder in the data folder.

2 - The options for the script are fully quoted and are in the command line.

Code: Select all
   
1   The final directory of the job (full path)
2   Blank
3   Subject
4   first unrar filename
5   blank
6   Group that the NZB was posted in e.g. alt.binaries.x
7   Status of post processing. 0 = OK


script.cmd "X:\Download" "" "This is the subject "blabla.srs" "" "alt.binaries.test" "0"


Everything is quoted to handle embedded spaces.

In addition to this. The complete list of input files (rars normally) is written to the "Input.txt" file also in the scripts folder and all the filenames for files inside the rar set are written to "Output.txt". These two files will live until the next unrar, then get overwritten.

3 - Newsbin will not unrar the next fileset until the script returns. So, you can do as much processing as you want in this script.

4 - You can enable logging and it'll write a log file to the scripts folder. Any output from the script is written to the log file.

As for what you do in the script, the sky is the limit. Move files, make copies of the RARs before Newsbin deletes them. Delete unwanted files. Run a virus check.

Re: New post-unrar scripting support in 6.50.

PostPosted: Fri Mar 29, 2013 4:38 am
by ozzii
Option like in SAB...

Thanks.

Re: New post-unrar scripting support in 6.50.

PostPosted: Fri Mar 29, 2013 7:14 am
by Quade
Yeah, basically you should be able to feed it SAB post UnRAR scripts. The input/output file list are unique but, shouldn't break existing SAB Scripts. The blank fields are for information I just don't have right now but, might in the future.

Re: New post-unrar scripting support in 6.50.

PostPosted: Wed Apr 17, 2013 2:26 pm
by mkanet
Thank you. I've been waiting a long time for this! I really appreciate it.

Re: New post-unrar scripting support in 6.50.

PostPosted: Thu Jul 17, 2014 8:53 pm
by deloppoled
I absolutely love this feature, thank you for adding it!

Re: New post-unrar scripting support in 6.50.

PostPosted: Thu Jul 17, 2014 9:35 pm
by Quade
Currently Newsbin works as a "black hole" for SB. I've been working on integrating it more directly so, Newsbin can tell SB when a download fails so, it can pick another NZB to try.

It won't be in 6.52 but, it's coming.