1
votes

I have been testing a little utility called CryptSync which uses 7zip to encrypt/compress a folder/file structure (then i can upload to a cloud drive the 7zipped separate files with nice encryped file and folder names).

The problem i have is that i would like a little batch file to decrypt the resulting encrypted folder names and 7zip files and am really struggling to work out how to decrypt the 7zip encrypted folder names

I have a rough working windows batch script here that works fine and decrypts all the individual 7zip files in all folders and subfolders .. but it still leaves the directory names encrypted.

Could anyone suggest any options to get the directories decrypted ... thx

here is my working script :

FOR /D /r %%F in ("*") DO (
    pushd %CD%
    cd %%F
        FOR %%X in (*.7Z) DO (
            "C:\Program Files\7-zip\7z.exe" x "%%X" -p"MYPASSWORD"
        )
    popd

)

as a second question if i may .. could anyone tell me how i get the script to delete the .7zip (and rename the old encrypted directory name) after succesfully extracting/decrypting

1

1 Answers

0
votes

The files are stored in the 7z file without any path. The path encryption is done by CryptSync alone, not using 7z at all. That means there is no way for you to decrypt the path from one 7z file.