Cyberanswers is now on youtube

Register a free account
ne nw
Crawlability Inc. Files for SEO Technology Patent
se sw

Go Back   Forum Index > Software | Hardware > Software
The Software Store

Software Software related issues

Reply
 
Thread Tools Display Modes
  #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
Sponsored Links

  #2  
Old 05-05-2008, 09:16 PM
grandpakewl grandpakewl is offline
Junior Member
 
Join Date: May 2008
Location: VA, USA
Posts: 1
winrar

Not sure if you are still looking for an answer, but I found that most of the archives start with something like ***.part01.rar or ***.part1.rar. I changed the line in the script:

for /F %%i in ('dir /s/b *.rar') do call :do_extract "%%i"

to:

for /F %%i in ('dir /s/b *part01.rar') do call :do_extract "%%i"

or

for /F %%i in ('dir /s/b *part1.rar') do call :do_extract "%%i"

That seemed to do the trick or stopping the repeated extracts but it still created a bunch of empty directories. Better than nothing I suppose...

Enjoy
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:41 AM.


234x60
Bulletin Board Custom Version by Mobo
Copyright © 2004-2007 Cyberanswers.org All rights reserved