Menu

How to use password AB"AB in the console

Help
2024-03-23
2024-03-31
  • Stefan Martens

    Stefan Martens - 2024-03-23

    Let's say MyArchive.7z has been created in 7z-GUI, password protected with AB"AB
    In the console the command to extract such a password protected archive is
    7za x "-pMyPassword" "MyArchive.7z"

    Following, however, won't work here, as " obviously needs to be escaped
    7za x "-pAB"AB" "MyArchive.7z"

    Now, how do I extract MyArchive.7z in the console?
    Any help would be appreciated very much.

     

    Last edit: Stefan Martens 2024-03-23
    • Serhii Zalohin

      Serhii Zalohin - 2024-03-31

      Echo AB^"AB| 7za x "MyArchive.7z"

       
      • Stefan Martens

        Stefan Martens - 2024-03-31

        Working!
        Thank you very much, Serhii!

         
  • Igor Pavlov

    Igor Pavlov - 2024-03-29

    such command can help:

    7z t arc.7z < psw.txt 
    

    there are no another ways now.

     

    Last edit: Igor Pavlov 2024-03-29
    • Sam Tansy

      Sam Tansy - 2024-03-29

      Maybe like this:

      Z:\> 7z.exe t a.7z -p`type pass.txt`
      
      Everything is Ok
      
      # equivalent to (in *nix):
      $ 7z t a.7z -p`cat pass.txt`
      

      Maybe if there was option to read password from a file, but there isn't.

       

      Last edit: Sam Tansy 2024-03-29

Log in to post a comment.