Skip to content

Instantly share code, notes, and snippets.

@dobriak
Created December 9, 2013 03:36
Show Gist options
  • Save dobriak/7867049 to your computer and use it in GitHub Desktop.
Save dobriak/7867049 to your computer and use it in GitHub Desktop.
Post processing script for SABnzbd on Windows. Moves processed files onto a NAS share.
[misc]
...
cleanup_list = .sfv, .nfo, .srr, .nzb
...
replace_spaces = 1
...
replace_dots = 1
...
ignore_samples = 1
enable_tsjoin = 1
auto_browser = 1
pause_on_post_processing = 0
enable_unrar = 1
...
download_dir = C:\Users\MYUSERNAME\Downloads\_incomplete
...
enable_par_cleanup = 1
safe_postproc = 1
...
complete_dir = C:\Users\MYUSERNAME\Downloads\_complete
replace_illegal = 1
...
script_dir = C:\Users\MYUSERNAME\AppData\Local\sabnzbd\postprocessing
...
@echo off
rem Post processing script for SABnzbd
set NASNAME=192.168.1.2
rem ping the nas just in case, exit if not online
ping %NASNAME% | find "TTL" > nul
IF ERRORLEVEL 1 GOTO ENDERROR
SET NASPATH=\\%NASNAME%\usb_storage\new
SET LOGFILE="%~d0%~p0\postprocessing.log"
echo. >> %LOGFILE%
echo %DATE% %TIME% Started processing %2 >> %LOGFILE%
echo %DATE% %TIME% ROBOCOPY /E /MOVE "%1" %NASPATH%\%~3 >> %LOGFILE%
ROBOCOPY /E /MOVE "%1" %NASPATH%\%~3
echo %DATE% %TIME% Finished processing %2 >> %LOGFILE%
exit 0
:ENDERROR
echo %DATE% %TIME% Error: Could not ping %NASNAME% , exiting. >> %LOGFILE%
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment