View Single Post
  #1  
Old 12-04-2007, 03:35 AM
reptile83 reptile83 is offline
Junior Member
 
Join Date: Dec 2007
Posts: 1
WinRar command promp

hello all

I need some help running winrar from command line. I download a lot of files online and usually they come in this type of multiple rar files:

dfa-lgs2-1.part01.rar
dfa-lgs2-1.part02.rar
dfa-lgs2-1.part03.rar
etc...

I need either a cmd script or a program that would unrar this for me. Usually I have about 20 different collections of these types of rar files in one folder. I would just like to run that script or program to unrar everything in that folder.

I found a script

"
@setlocal
@echo off
set path="C:\Program Files\WinRAR\";%path%
for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i"
goto :eof

:do_extract
echo %1
mkdir %~1.extracted
pushd %~1.extracted
unrar e %1
popd
"

That does somewhat of a similar job, but its not 'smart' enough to understand that
dfa-lgs2-1.part01.rar and dfa-lgs2-1.part02.rar are the same file and only needs to be extracted once. Instead it extracts dfa-lgs2-1.part01.rar and then tries to extract
dfa-lgs2-1.part02.rar overwriting the first one.

Has anybody else encountered anything similar and found a way to fix it?

Thanks
Reply With Quote