View Full Version : Auto unrar files...
conan
01-02-2012, 05:42 AM
Hi!! First happy new year!
I wonder if there is anyway of aouto unrar files as Jdownloader do. I mean, I download a huge amount of rars a day in their own folder and haver to unrar them one by one to meke it in his own folder.
Is there any way of do it as the Jdownloader does?
Thanks.
FTPServerTools
01-03-2012, 02:50 PM
It isnt really difficult. Just write a cmd line script/ You can use loops and if statements and catch errors and all.
I have no idea what jdownloader does but if you can unrar something by hand then it is fairly simple to make a cmd line script for it. I am lazy tho and I use recurse (see my website) which basically recursively can run scripts in a directory.
As lazy as I am I have a c:\run\doall.cmd with the following contents:
In that doall.cmd I call:
c:\run\recurse.exe /m:*.zip /c:c:\run\dozip.cmd
c:\run\recurse.exe /m:*.001 /c:c:\run\do001.cmd
c:\run\recurse.exe /m:*.part001.rar /c:c:\run\dopart001.cmd
c:\run\recurse.exe /m:*.part01.rar /c:c:\run\dopart01.cmd
c:\run\recurse.exe /m:*.part1.rar /c:c:\run\dopart1.cmd
c:\run\recurse.exe /m:*.rar /c:c:\run\dorar.cmd
Now the other files are:
dozip:
ren "%[FILENAME]" axxy.zip
unzip -o axxy.zip
del axxy.zip
dorar
rar x -y -av- -- "%[FILENOEXT].rar"
del "%[FILENOEXT].r??"
dopart1
rar x -y -av- -- "%[FILENAME]"
del "*.part?.rar"
dopart01
rar x -y -av- -- "%[FILENAME]"
del "*.part??.rar"
dopart001
rar x -y -av- -- "%[FILENAME]"
del "*.part???.rar"
do001
rar x -y -av- "%[FILENOEXT].001"
del "%[FILENOEXT].0??"
You dont need recurse tho you can just as easily do it in vb or windows shell or jscript or even a .cmd file..
example of a .rar unpack line:
for /f "tokens=*" %G in ('dir /b *.rar) do rar x -y %g
Of course you then have to be carefull when an error occurs but it is simple enough.
conan
01-04-2012, 03:19 AM
Thank you very much I'l try it!
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.