Execute Command on Completion
Since version 0.26.1, Alt.binz includes an Execute Command feature that runs after PAR2 checking, repairing or unraring is complete (whichever is last in the cycle).
The default execute command can be set in Setup > NZB #2, but commands can also be specified separately for any collection in the queue (right-click, choose Change Execute Command, edit entry in Execute column). The format for commands is:
Use $d for full download path without a trailing delimiter.
Use $u for full unrar path without a trailing delimiter.
Use $col for the collection name.
c:\util\MyCleanupRoutine.exe "-a $d" c:\util\CleanupAfterUnrar.bat "$d $u"
- Sample script:
This logs all new files in download and unrar directories with date/time stamps. To use, copy the code, open Notepad, paste and save the file in your Alt.Binz directory (or anywhere else) as "logdownloads.bat" (*with* quotation marks).
Command: c:\program files\altbinz\logdownloads.bat "$d $u"
@echo off :set_logfile set logfile=C:\dldlog.txt if not exist %logfile% echo Alt.Binz Download Log > %logfile% :set_folders set dldir=%1 set undir=%2 :check_folders if exist %dldir% for %%f in (%dldir%\*.*) do (call :log_files "%%f") if exist %undir% for %%f in (%undir%\*.*) do (call :log_files "%%f") goto :eof :log_files find /I "%~nx1" "%logfile%" >nul if %ERRORLEVEL%==0 goto :eof for /f "tokens=*" %%t in ('time /t') do (set timet=%%t) echo %DATE% %TIMET% %~dpnx1 >> %logfile% goto :eof