batch-filewinrarutorrent

uTorrent run program issue


Hi I have an Issue when trying to run a widows batch script from uTorrent when downloads are ready.

The script is really basic and will just unrar any rarfiles located in folder and create some log files. The script works just fine when I run it in cmd but when uTorrent runs the script everything works except the unrar line. This means that all the logfiles are created so I know that my parameters are correct.

:: BEGIN TORRENT_DONE.BAT 
:: 
:: In uTorrent 'Run Program' 
:: enter data like: 
:: H:\TORRENT_DONE.BAT "%D" "%N" :: 
:: INCLUDE QUOTE MARKS :: 

@ECHO OFF 
SET JOBDIR=%~1 
SET JOBNAME=%~2 
CD/D "%JOBDIR%" 
>JOB_"%JOBNAME%".LOG ECHO.%JOBNAME% 
>>JOB_"%JOBNAME%".LOG ECHO. 
IF EXIST *.RAR GOTO :UNPACK_RAR 
GOTO :NO_UNPACK 

:UNPACK_RAR
>>JOB_"%JOBNAME%".LOG ECHO.FOUND RAR FILES 
unrar x *.rar >>JOB_"%JOBNAME%".LOG 
GOTO :DONE 

:NO_UNPACK 
>>JOB_"%JOBNAME%".LOG ECHO.NO FILES FOUND TO UNPACK 
>>JOB_"%JOBNAME%".LOG DIR/B 

:DONE 
>>JOB_"%JOBNAME%".LOG ECHO.Im Done!
::
:: END TORRENT_DONE.BAT 

What might be the issue, could it be that uTorrents doesn't have the correct privileges to run winrar or something like that?

Also, my path is set in Environment Variables so that is not the issue here.

Thanks for any assistance on this issue. Best Regards Emil


Solution

  • This is not a real programming issue so your question may be transfered.

    If it is a privileges problem, did you try to run Utorrent with administrator privileges ?