Find, unpack and pack zip files

  • Hey


    this problem is a bit mor complicated than i thought... i have here 1100 zip files with the same password. And i want to unpassword them (so, unpack with password and pack again)


    It looks like this:


    Code
    folder/subfolder1/subsubfolder1/file1.zip
    folder/subfolder1/subsubfolder1/file2.zip
    folder/subfolder2/subsubfolder2/file1.zip
    ...


    It is no must that there are always only 2 subfolders and it is no must that there are only two zip files in a folder.


    i want to have the unpassworded zip files in a complete new tree but with the SAME subfolders etc.

    Code
    folder2/subfolder1/subsubfolder1/file1.zip
    folder2/subfolder1/subsubfolder1/file2.zip
    folder2/subfolder2/subsubfolder2/file1.zip


    i have absolutely no clue how to do this... i tried several things with windows, mac and linux. but nothing really did what i wanted it to do...
    I hope someone can help me here!


    Thanks in advance
    BR
    WastlJ

  • That would be a hell of a shell script... you would need to a create the target destination of course and then do the unpacking. I'm not the shell expert here but I doubt that this would be an easy script...


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • i did something with my basic skills and some code i foud with an hour googling.
    Maybe it is possible to do this even faster / nicer but hey - it works!


    It
    1. asks for the ZIP password
    2. searches for any zip below the current folder
    3. saves the strings in a file called "zips"
    4. reads this file line by line
    5. unzips with the entered password
    6. zips without any password



Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!