hi,
iirc there used to be an unrar script for ftprush. unfortunately I am not capable to write one myself. can anybody please explain how to automatically unrar a finished download or provide their script maybe?
thx in advance.
//------------------------------------- ---- --- - -
// AUTOUNRAR(SENDER)
// starts AutoUnRAR.BAT RushApp.UI.Selection.TargetLocalPath
// that extracts a containing *.RAR-File when there is no
// change in the FolderSize for about 10 seconds.
//------------------------------------- ---- --- - -
procedure AUTOUNRAR(Sender);
var TargetPath;
begin
RushApp.UI.Selection.Prepare
TargetPath := RushApp.UI.Selection.TargetLocalPath;
ShellExecuteCommand('C:\Windows\system32\cmd.exe','/C K:\Bat\AutoUnRAR.bat ' + TargetPath,'',0);
end;
@echo off
echo =====[ Entpacke die *.RAR-Datei sobald sich der Ordner nicht mehr ändert ]=====
echo.
echo Start mit 1: %1%
echo.
%~d1%
cd %~dp1%
echo %~dp1%
echo.
echo %TIME%: Überprüfe Ordner
set oldsize=0
set i=0
:Start
K:\Bat\Sys\warten.exe 1000 > NUL
SET SIZE=0
For /F "tokens=3 Delims= " %%i in ('dir^|Find "Datei(en)"') Do SET SIZE=%%i
if %size%==%oldsize% goto nochange
echo %TIME%: %SIZE%
set oldsize=%SIZE%
set i=0
goto Start
:nochange
set /a i=%i%+1
echo %TIME%: %SIZE% unverändert zum %i%. mal
if %i%==10 goto unrar
goto Start
:unrar
SET FILE=0
For /F "tokens=4 Delims= " %%i in ('dir^|Find /i ".rar"') Do SET FILE=%%i
echo RAR-File: %FILE%
echo Path: %~dp1%FILE%
echo %TIME%: Extracting!-------------------------------------------------------
K:\Bat\Sys\Rar.exe e %~dp1%FILE%
echo %TIME%: Done!-------------------------------------------------------------
pause
For /F "tokens=3 Delims= " %%i in ('dir^|Find "Datei(en)"') Do SET SIZE=%%i
Users browsing this forum: No registered users and 1 guest