New post-unrar scripting support in 6.50.
Posted: Thu Mar 28, 2013 7:17 pm
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.
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.
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.