supply rar password at command line?

Discussion in 'Computer Support' started by nguyen.h.khanh, Mar 18, 2007.

  1. Hello,

    Does anyone know a way to supply password at command line for Winrar?
    I looked at the help but found nothing.

    If not, is there a way to remove rar password in a rar file, provided
    that I have the password.

    Many thanks,

    nguyen.h.khanh, Mar 18, 2007
    1. Advertisements

  2. nguyen.h.khanh

    Mike Easter Guest

    unrar x -p password filename.rar
    Mike Easter, Mar 18, 2007
    1. Advertisements

  3. nguyen.h.khanh

    knguyen Guest


    This does not work. I think -p means setting the password instead.

    knguyen, Mar 19, 2007
  4. nguyen.h.khanh

    Mike Easter Guest

    Try leaving out the space and using some "/quotes

    If your filename has a space in it, "/quote that too,

    unrar x -p"password" "file name.rar"
    Mike Easter, Mar 19, 2007
  5. nguyen.h.khanh

    why? Guest

    You didn't even try.... that hard.

    Help file,

    First , search for password you get


    Both RAR and ZIP formats support encryption. To encrypt files you need
    to specify a password before archiving or directly in the Archive name
    and parameters dialog. In the command line this is done by using switch

    Clicking on the highlighted -p[pwd]

    you then get

    Switch -P[pwd] - set password
    Set a password <pwd> to encrypt files during archiving or to decrypt
    during extracting. The password is case-sensitive. If you omit the
    password in the command line, you will be prompted to enter it.

    That's about 4 seconds work search for 'password' read and click a link.

    Running unrar with no options tells you as well

    p[password] Set password

    Since you are unpacking a rar and not creating it, then settin gthe pw
    is to extract.
    unrar x iperf.rar -ppassword

    UNRAR 3.62 freeware Copyright (c) 1993-2006 Alexander Roshal
    Extracting from iperf.rar

    iperf\doc\dast.gif already exists. Overwrite it ?
    [Y]es, [N]o, [A]ll, n[E]ver, [R]ename, [Q]uit a
    Extracting iperf\doc\dast.gif OK
    Extracting iperf\doc\index.html OK

    why?, Mar 19, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.