0

I am sorry about my English it means the a.txt file is compressed into a3000.zip file, and then the a3000.zip file is compressed into a2999.zip file, and so on until the a0.zip file. I only have a0.zip file, how can I view a.txt file.

  • 2
    Welcome to `SO`. Your question does not include any code where we could help, please edit your question and provide it. – Jan Jun 28 '20 at 08:07
  • Its one outer zip file and then a zip in a zip in a zip...? – tdelaney Jun 28 '20 at 08:12
  • If you know all of the names, this, at least on a unix like system, is `cat a3000.zip | unzip -p a2999.zip | unzip -p a2998.zip | .... | unzip -p a1.zip | unzip -p orignal_file > original_file`. You could write something to generate that string and pass it to `subprocess.call(the_command, shell=True)`. – tdelaney Jun 28 '20 at 08:22
  • I am sorry about my English it means the a.txt file is compressed into a3000.zip file, and then the a3000.zip file is compressed into a2999.zip file, and so on until the a0.zip file. I only have a0.zip file, how can I view a.txt file. – Tien Nguyen Jun 28 '20 at 09:40
  • See this https://stackoverflow.com/questions/11930515/unzip-nested-zip-files-in-python – pmqs Jun 28 '20 at 15:58

1 Answers1

0

since you didn't provide any code so, its difficult to help accurately,but i think regex might help you regex -https://www.w3schools.com/python/python_regex.asp

import re
x='a1.zip->a2.zip->a3.zip'
y=re.search('a3000.zip')
print(open(y))

this code might help you

  • I am sorry about my English it means the a.txt file is compressed into a3000.zip file, and then the a3000.zip file is compressed into a2999.zip file, and so on until the a0.zip file. I only have a0.zip file, how can I view a.txt file. – Tien Nguyen Jun 28 '20 at 09:40