Batch extract different RAR archives that have same password?

Discussion in 'other software & services' started by paulescobar, Jan 1, 2009.

Thread Status:
Not open for further replies.
  1. paulescobar

    paulescobar Registered Member

    Joined:
    Sep 22, 2008
    Posts:
    181
    I backed up my icon sets in password-protected RAR archives.
    Now I'd like to extract them.

    Problem is, I didn't create a split-archive.
    Instead I created a seperate archive for each set.
    Luckily, they all share the same password.

    But WinRar keeps asking me for the password, every archive.
    That means I have to sit around & monitor the extractions of over 100 archives.

    I'd like to input the password once.
    Then let the software extract the various archives automatically.


    Is this possible in WinRar?
    Is this possible in another extraction software?


    ___


    P.S.

    Someone suggested I use the WinRar command line features.
    Unfortunately, I have no idea how it works. :'(
    I keep getting errors with my code.

    So if someone can help me, here is my situation...

    The OS:
    Code:
    Windows XP
    The archives are located at:
    Code:
    C:\Downloads\A.rar
    C:\Downloads\B.rar
    C:\Downloads\C.rar
    The password for each archive is:
    Code:
    iconpass
    The extraction location should be:
    Code:
    C:\Icons\
     
    Last edited: Jan 1, 2009
  2. iceni60

    iceni60 ( ^o^)

    Joined:
    Jun 29, 2004
    Posts:
    5,116
    open a dos prompt and run this -
    Code:
    cd C:\Downloads
    C:\Program Files\WinRAR\unrar.exe e -p iconpass *.rar
    i haven't got windows, but it might work.

    i found this too if that doesn't work -
    http://www.respower.com/page_tutorial_unrar
     
    Last edited: Jan 1, 2009
  3. Sully

    Sully Registered Member

    Joined:
    Dec 23, 2005
    Posts:
    3,719
    Very close for not having windows. Using v3.7 it would be

    Code:
    "C:\Program Files\WinRAR\unrar.exe" e -ad -ppassword *.rar c:\Icons
    For v3.7 you must place the password directly after the -p, else it queries you. Also, the addition of -ad is so that each archive is extracted to it's own sub-directory, in case that is needed. Omit if not.

    Sul.
     
  4. paulescobar

    paulescobar Registered Member

    Joined:
    Sep 22, 2008
    Posts:
    181
    Thank you so much iceni60! :D

    Your post got me started on the right path.
    A couple of things I had to change, as Sully pointed out.

    But within half an hour, I figured out how to batch extract/test my archives.

    Also, thanks to Sully for sharing that code. :D

    You're absolutely right about the password bit.

    But I used the "x" command instead of "e"...
    Because there were folders within the archive that I wanted to extract.

    Again, thanks to you both! :D
    I couldn't find a solution to this problem on "google".
    Hopefully others will take advantage of this topic.
     
Loading...
Thread Status:
Not open for further replies.