Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How To Use 7zip Command Line to Decrypte Multipul Files in Subfolders

kgkg
2014-03-25
2014-03-28
  • kgkg
    kgkg
    2014-03-25

    UPDATE:
    I now found that using the option -p solves the need to enter the password for every single file.

    FOR /R "E:\CryptSync\01 Personal Files" %I IN (*.cryptsync) DO "C:\Program Files\7-Zip\7z.exe" e "%I" -aou -pBLA123456
    http://www.dotnetperls.com/7-zip-examples
    -p is the option and
    BLA123456 is the password key.

    I still haven't found the location of the expanded and decrypted files....
    Please help.

     
  • fernando
    fernando
    2014-03-25

    look in directory you execute command line operation.

    look at -o [output directory] 7-zip command switch.
    consider 7-zip switch x [extract with paths] as opposed to e [extract no paths].

     
  • kgkg
    kgkg
    2014-03-25

    Hi Fernando and All,
    If I use the command:
    FOR /R "E:\CryptSync\01 Personal Files" %I IN (*.cryptsync1) DO "C:\Program Files\7-Zip\7z.exe" x "%I" -o"E:\CryptSync\111" -pPASWORD

    then I get the deciphered files to the folder "E:\CryptSync\111" and all the file are in one folder.
    This means that all the sub-folder structure is eliminated.

    How do read the encrypted file path and then decipher it to that exact folder?
    for example:
    If I have a encrypted file called "Secret.DOC.cryptsync" in:
    "E:\CryptSync\01 Personal Files\Folder_ONE\Folder_TWO\Secret.DOC.cryptsync"
    how do I decipher it to:
    "E:\CryptSync\01 Personal Files\Folder_ONE\Folder_TWO\Secret.DOC"?

    I need the variable that knows which folder the encrypted file was in at that iteration.
    https://kfhhew.dm2303.livefilestore.com/y2pwqbnFDJ9fyiMWP6wOATwlOR_HR3M38brTyTPQ9Hlc7Xgsd-CK6xCWeERvJciCF14gOKezKUe5Jh_dmok1zut4r9W1meNmM-s_0qYk8552rM/cs04.png

    Remark: when the deciphering is done then the extension .cryptsync is automatically removed.

     
    Last edit: kgkg 2014-03-25
    • fernando
      fernando
      2014-03-26

      does the archive contain all the sub-folder structure:
      \Folder_ONE\Folder_TWO

       
    • fernando
      fernando
      2014-03-28

      If I have a encrypted file called "Secret.DOC.cryptsync" in:
      "E:\CryptSync\01 Personal Files\Folder_ONE\Folder_TWO\Secret.DOC.cryptsync"
      how do I decipher it to:
      "E:\CryptSync\01 Personal Files\Folder_ONE\Folder_TWO\Secret.DOC"?

      try:

      FOR /R "E:\CryptSync\01 Personal Files" %I IN (*.cryptsync) DO "C:\Program Files\7-Zip\7z.exe" x "%I" -o"%~dpnI" -pPASWORD
      

      .