PDA

View Full Version : RAR - UNRAR Question


donate
10-18-2003, 01:06 PM
ioftpd.ini:
unrar = EXEC ..\iozs\UnRAR.exe e
rar = EXEC ..\iozs\RAR.exe a

usage now:
site unrar $current_path\packed.rar $current_path\
site rar -m0 -v15000 -vn $current_path\pack.rar $current_path\source.file

( $current_path = Full Windows Path C:\ioftpd\.... )

THIS WORKS ^



But i want:

unrar = EXEC ..\iozs\UnRAR.exe e $file $destination
so:
site unrar packed.rar (this would extract in same dir as packed.rar)
or:
site unrar packed.rar /testdir/extract/here



rar = EXEC ..\iozs\RAR.exe a $m $v -vn $destination $source
(vn = old volume style)

so:
site rar 0 15000 pack.rar source.file


Anyone has any idea how this can be done?
With ioFTPD..... if not, WarC? :D



Thanks in advance

kraxdaz
10-18-2003, 01:14 PM
maybe u can use the FlashFXP variables:

%f Selected Filename
%p Current Path

donate
10-18-2003, 01:26 PM
Originally posted by kraxdaz
maybe u can use the FlashFXP variables:

%f Selected Filename
%p Current Path

unrar = EXEC ..\iozs\UnRAR.exe e %f %p

[R] site unrar test.001
[R] 200-
[R] 200-UNRAR 3.20 freeware Copyright (c) 1993-2003 Eugene Roshal
[R] 200-
[R] 200-Cannot open %f.rar
[R] 200-The system cannot find the file specified.
[R] 200-No files to extract
[R] 200 Command Successful.

I think not, or i have no idea how to use variables in ioftpd(.ini)

darkone
10-18-2003, 04:36 PM
Create a .bat file that executes unrar/rar:

rar.bat:

@echo off
c:\whatever\rar.exe -m0 -vn15000 %path%\%1 %path%\%2
echo !detach 0

RAR = EXEC ..\scripts\rar.bat

To archive contents of current directory: SITE RAR myrar.rar .
To archive directory/file within current directory: SITE RAR myrar.rar <file/directory>

unrar.bat:

@echo off
echo !buffer off
c:\whatever\unrar.exe %path%\%1 %path%

UNRAR = EXEC ..\scripts\unrar.bat

To unrar contents of .rar file to current directory: SITE UNRAR myrar.rar

... Didn't test it, but something like that should work

donate
10-18-2003, 05:13 PM
Thats exactly what i dreamed of!! Thanks

ioftpd.ini:
unrar = EXEC ..\scripts\UnRAR.bat
rar = EXEC ..\scripts\RAR.bat

unrar.bat:
@echo off
echo !buffer off

RAR.exe e -y %path%\%1 %path%

rar.bat:
@echo off
echo !buffer off

set compression=-m%1
set size=-v%2000

RAR.exe a -y -ep1 -vn -x.* %compression% %size% %path%\%3 %path%\%4

copy rar.exe in ioftpd\system dir
( get rar.exe from C:\Program Files\WinRAR\ or similar )



site rar 0 15 pack.rar
site rar 0 15 pack.rar file/dir only
site unrar packed.rar

site rar:
0 = compression (0=store 1=fastest 2=fast 3=normal 4=good 5=best)
15 = spanning size (15 = 15,000,000)
pack.rar = create pack.rar in current directory
pack.rar file/dir only = create pack.rar in current directory, chosen file or directory only

site unrar:
packed.rar = extract rar to current directory

Thats what i am using now.




Thanks darkone and everyone who helped me in IRC.

Very handy for you packing people :banana:


Edit:
P.S.
-ep1 = Do not include Parent directories in rar

-vn = Old Volume Style Rarring
test.rar test.001
Not new style; test.part1.rar test.part2.rar crap :rolleyes:

-x.* = exclude all hidden files .ioFTPD .race .etc..


Changed
echo !detach 0 to echo !buffer off
It shows real time how the procces is going, i like that.

RAR.exe is Only needed, it can unrar too.

THNX!

NorLan
01-05-2004, 05:13 AM
nice tool

perhaps some addon to this:
@echo off
md %path%\Extracted
start D:\ioFTPD\scripts\HideRun.exe D:\ioFTPD\scripts\unrar.exe x -y %path%\%1% %path%\Extracted

SomeoneWhoCares_2
01-05-2004, 05:22 AM
its hidden anyways when run through io so whats the point ??

NorLan
01-05-2004, 05:42 AM
changed the message above...

it works i've forgotten the start at the beginnning
(those who know similar to ioBanana)

do it that way and you can work with flashfxp during the rar is running

NorLan
01-05-2004, 06:01 AM
hmm another problem:

i have a release with subdirectories eg:
/release/
/release/cd1
/release/cd2

i want to extract it to a directory named d:\extracted
but there i want to have a structure like this:
d:\extracted\release\
d:\extracted\release\cd1
d:\extracted\release\cd2

how could i manage this?!

SomeoneWhoCares_2
01-05-2004, 01:29 PM
in unrar.bat change
RAR.exe e -y %path%\%1 %path%
to
RAR.exe x -y %path%\%1 %path%
DONE!