Given a .zip with the following example structure:
/folder1/ file1.1.txt file1.2.txt /folder2/ file2.1.txt file2.2.txt file1.txt file2.txt
I need to be able to modify that internal file structure using 7zip command line tool like so:
1. I need to move all existing files to a new folder inside the archive (say prefix the stored paths with "/myfolder")
- I need to add another folder with other files (outside this question, resolved)
So, without unzipping, I would like to have the following structure as a result:
/myfolder/ myfolderfile1.txt myfolderfile2.txt /data/ /folder1/ file1.1.txt file1.2.txt /folder2/ file2.1.txt file2.2.txt file1.txt file2.txt
I know how to resolve point 2, but point 1 (changing the internal structure) is the one giving me trouble.
The reason for this requirement is that I am working with VERY large and complex archives with the sole purpose of rearranging the files and adding a few more in the same manner to all. It seems counterproductive to unzip for each file (that could take up to an hour) when I could do this easier.
Also, if there is another tool that can perform this task better (i.e. NOT 7zip, but some other free command line tool), I am open for suggestions.
Thank you kindly!
P.S. I am aware there might be a path length problem when increasing the directory path near 248 characters, but that is acceptable.